Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
28
Task/Loops-For/Lambdatalk/loops-for.lambdatalk
Normal file
28
Task/Loops-For/Lambdatalk/loops-for.lambdatalk
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{def loops_for
|
||||
{lambda {:i :n}
|
||||
{if {>= :i :n}
|
||||
then (end of loop)
|
||||
else {br}{S.map {lambda {} *} {S.serie 0 :i}}
|
||||
{loops_for {+ :i 1} :n}}}}
|
||||
-> loops_for
|
||||
|
||||
{loops_for 0 5}
|
||||
->
|
||||
*
|
||||
* *
|
||||
* * *
|
||||
* * * *
|
||||
* * * * * (end of loop)
|
||||
|
||||
a simpler way, using {S.map function {S.serie start end [step]}
|
||||
|
||||
{S.map {lambda {:i} {br}
|
||||
{S.map {lambda {:i} *}
|
||||
{S.serie 1 :i}}}
|
||||
{S.serie 1 5}}
|
||||
->
|
||||
*
|
||||
* *
|
||||
* * *
|
||||
* * * *
|
||||
* * * * *
|
||||
Loading…
Add table
Add a link
Reference in a new issue