Artifact Content
Not logged in

Artifact 5b2c3c452aca5b18dd794ec5224325774e804146


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