user-defined operators

Dave Love <>
Fri Mar 26 12:47:56 CET 2004


Carsten Schultz <> writes:

> The clever bit is that by enclosing
> an operator name in parentheses, you make it an ordinary variable,

Actually it's a `section' -- partial application:

Prelude> (/) 4 2
2.0
Prelude> (4/) 2
2.0
Prelude> (/2) 4
2.0

(You get to define the precedence and associativity of user-defined
Haskell operators, of course.)



More information about the erlang-questions mailing list