Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Haskell: Operators are functions

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


Previous                                                 Next                                                 Home


This post first appeared on Java Tutorial : Blog To Learn Java Programming, please read the originial post: here

Share the post

Haskell: Operators are functions

×

Subscribe to Java Tutorial : Blog To Learn Java Programming

Get updates delivered right to your inbox!

Thank you for your subscription

×