mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-09 00:08:44 +00:00
More stdlib; memoized CPS parser combinators workout
This commit is contained in:
parent
b05ad7f6b1
commit
1027d988fc
10 changed files with 253 additions and 7 deletions
7
stdlib/regression/test08.expr
Normal file
7
stdlib/regression/test08.expr
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import Fun;
|
||||
|
||||
local fact = fix (fun (self) {fun (n) {if n <= 1 then 1 else n * self (n-1) fi}});
|
||||
|
||||
printf ("%d\n", fact (3));
|
||||
printf ("%d\n", fact (5));
|
||||
printf ("%d\n", fact (7))
|
||||
Loading…
Add table
Add a link
Reference in a new issue