12 lines
243 B
Text
12 lines
243 B
Text
|
|
{def foo
|
||
|
|
{lambda {:s} // :s will get any sequence of words
|
||
|
|
{S.first :s}
|
||
|
|
{if {S.empty? {S.rest :s}} then else {foo {S.rest :s}}}}}
|
||
|
|
-> foo
|
||
|
|
|
||
|
|
{foo hello brave new world}
|
||
|
|
-> hello brave new world
|
||
|
|
|
||
|
|
{foo {S.serie 1 10}}
|
||
|
|
-> 1 2 3 4 5 6 7 8 9 10
|