Variadic function: Difference between revisions
Content added Content deleted
SqrtNegInf (talk | contribs) m (→{{header|Raku}}: Fix comment: Perl 6 --> Raku) |
No edit summary |
||
Line 1,516: | Line 1,516: | ||
Whatever |
Whatever |
||
</pre> |
</pre> |
||
=={{header|Lambdatalk}}== |
|||
Lambdas are de facto variadic in lambdatalk |
|||
<lang scheme> |
|||
{def foo |
|||
{lambda {:s} |
|||
{if {S.empty? {S.rest :s}} |
|||
then {br}{S.first :s} |
|||
else {br}{S.first :s} {foo {S.rest :s}}}}} |
|||
{foo hello brave new world} -> |
|||
hello |
|||
brave |
|||
new |
|||
world |
|||
{foo {S.serie 1 10}} -> |
|||
1 |
|||
2 |
|||
3 |
|||
4 |
|||
5 |
|||
6 |
|||
7 |
|||
8 |
|||
9 |
|||
10 |
|||
</lang> |
|||
=={{header|Lasso}}== |
=={{header|Lasso}}== |