[Haskell-beginners] Change in type that I don't understand

Jan Erik Moström lists at mostrom.pp.se
Fri Jan 27 11:23:56 UTC 2017


Hi,

Here is something that I don't understand, why does the named value have 
a different type than just the value itself?

Prelude> let f x = x * x
Prelude> :t f
f :: Num a => a -> a
Prelude> :t [f]
[f] :: Num a => [a -> a]
Prelude> let g = [f]
Prelude> :t g
g :: [Integer -> Integer]

= jem


More information about the Beginners mailing list