Skip to main content

operators

infix function

> :type (==)
forall (@a :: Type). Eq a => a -> a -> Boolean
  • operator

    • the equality operator, = = is a function. So are +, *, -, / and pretty much all operators.
  • If a function is comprised only of special characters, it's considered an infix function by default.

we have to surround it in parentheses, if we want to

  • examine its type (use :t or :type)
  • pass it to another function or
  • call it as a prefix function

Operators can be partially applied by surrounding them with parentheses and using _ as one of the operands: https://github.com/purescript/documentation/blob/master/language/Syntax.md#operator-sections