Tutorial by Examples

Logical && is logical AND, || is logical OR. == is equality, /= non-equality, < / <= lesser and > / >= greater operators. Arithmetic operators The numerical operators +, - and / behave largely as you'd expect. (Division works only on fractional numbers to avoid rounding issue...
In Haskell, you can define any infix operator you like. For example, I could define the list-enveloping operator as (>+<) :: [a] -> [a] -> [a] env >+< l = env ++ l ++ env GHCi> "**">+<"emphasis" "**emphasis**" You should always give s...
Because infixes are so common in Haskell, you will regularly need to look up their signature etc.. Fortunately, this is just as easy as for any other function: The Haskell search engines Hayoo and Hoogle can be used for infix operators, like for anything else that's defined in some library. ...

Page 1 of 1