recursion!
This commit is contained in:
parent
a85203bc94
commit
aace8a5a77
2 changed files with 12 additions and 2 deletions
|
|
@ -31,3 +31,9 @@ e('"abc" & "def"');
|
|||
e('n = 5; n | 5 \\ "five" | _ \\ "other"');
|
||||
e('list = [1, 2, 3]; list | [x, y, z] \\ x + y + z');
|
||||
e('point = {x = 5, y = 10}; point | {x = px, y = py} \\ px + py');
|
||||
|
||||
e(`factorial = n \\ n
|
||||
| 0 \\ 1
|
||||
| n \\ n * factorial (n - 1);
|
||||
|
||||
factorial 5`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue