home |
sum2 x y = x + y
sum2 :: Double -> Double -> Double sum2 x y = x + y
isOne :: Int->Bool isOne x = x == 1
Prelude> :l foo.hs [1 of 1] Compiling Main ( foo1.hs, interpreted ) Ok, modules loaded: Main. *Main> :t isOne isOne :: Int -> Bool *Main> isOne (-1) False *Main> isOne 1 True