Currying: Difference between revisions

Content added Content deleted
(Add Nimrod)
Line 333: Line 333:
let add2 = addN(2)
let add2 = addN(2)
echo add2(7)</lang>
echo add2(7)</lang>
Alternative syntax:
<lang nimrod>import future

proc addM[T](n: T): auto = (x: T) => x + n

let add3 = addM(3)
echo add3(7)</lang>


=={{header|PARI/GP}}==
=={{header|PARI/GP}}==