Haskell Language Function examples


Example

What's the type of (+) ?

λ> :t (+)
(+) :: Num a => a -> a -> a

What's the type of sqrt ?

λ> :t sqrt
sqrt :: Floating a => a -> a

What's the type of sqrt . fromIntegral ?

sqrt . fromIntegral :: (Integral a, Floating c) => a -> c