Why does this work - haskell mysteries?