[Haskell-cafe] A beginners question

Harri Kiiskinen harkiisk at utu.fi
Sat Feb 23 11:00:19 EST 2008


Dear All,

banging my head against Haskell, but liking the feeling of hurting
brains. Just a simple question:

If

fmap (^4) [1,2,3] >>= \i -> shows i " "

gives

"1 16 81 "

then why does 

let i = fmap (^4) [1,2,3] in shows i " "

give

"[1,16,81] "

Probably very simple, but there must be a delicate difference between
these two expressions. I just don't get it.
-- 
Harri Kiiskinen <harri.kiiskinen at utu.fi>



More information about the Haskell-Cafe mailing list