Currying: Difference between revisions
added Arturo
(Replace println() with print(); replace output "syntaxhighlight" tag with "pre" tag) |
Drkameleon (talk | contribs) (added Arturo) |
||
Line 253:
{{Out}}
<pre>{«script», «script», 5, {7, 14, 21, 28, 35, 42, 49, 56, 63, 70}}</pre>
=={{header|Arturo}}==
<syntaxhighlight lang="arturo">addN: function [n][
return function [x] with 'n [
return x + n
]
]
add2: addN 2
add3: addN 3
do [
print add2 7
print add3 7
]</syntaxhighlight>
{{out}}
<pre>9
10</pre>
=={{header|BQN}}==
Line 265 ⟶ 286:
<syntaxhighlight lang="text">4
4</syntaxhighlight>
=={{header|C}}==
|