Haskell implements operators as
functions. Just like how you get type signature of a variable, function, you
can also get the type signature of an operator by using :t command.
Prelude> :t (+) (+) :: Num a => a -> a -> a Prelude> Prelude> :t (*) (*) :: Num a => a -> a -> a Prelude> Prelude> :t (==) (==) :: Eq a => a -> a -> Bool Prelude> Prelude> :t (&&) (&&) :: Bool -> Bool -> Bool
No comments:
Post a Comment