Call a function: Difference between revisions
Content added Content deleted
Walterpachl (talk | contribs) (→{{header|REXX}}: add Version 2) |
m (→{{header|Nemerle}}: corrected partial application example) |
||
Line 728: | Line 728: | ||
// partial application |
// partial application |
||
def f(a, b) { ... } |
def f(a, b) { ... } |
||
def g = f(2) |
def g = f(2, _) |
||
def |
def h = f(_, 2) |
||
def a = g(3) // equivalent to: def a = f(2, 3) |
|||
def b = h(3) // equivalent to: def b = f(3, 2)</lang> |
|||
=={{header|OCaml}}== |
=={{header|OCaml}}== |