Diff
Not logged in

Differences From Artifact [8a19e45bd42355a9]:

To Artifact [5b2c3c452aca5b18]:


1 def fib(x) 1 def fib(x) 2 { 2 { 3 if( x < 2 ) { 1 } < 4 else { fib(x-1) + fib(x-2) } | 3 if x<2 then 1 else fib(x-1) + fib(x-2) 5 }; 4 }; 6 5 7 let upto = λ(n, f){ | 6 let upto = fun(n, f){ 8 if( n > 0 ){ upto(n-1,f) }; | 7 if n > 0: upto(n-1,f); 9 f(n) 8 f(n) 10 }; 9 }; 11 10 12 var compose = fun(f,g){ fun(x){f(g(x))} }; 11 var compose = fun(f,g){ fun(x){f(g(x))} }; 13 var "<<" = compose; 12 var "<<" = compose; 14 13 15 upto(16, print<<fib); 14 upto(16, print<<fib);