Variadic fixed-point combinator: Difference between revisions

Content added Content deleted
Line 143:
end function
 
function c1(sequence f3f, integer n, d)
if n=1 then return d end if
return call_lambda(f3f[2+odd(n)],{n,d+1})
end function
 
function c2(sequence f3f, integer n, d)
return call_lambda(f3f[1],{floor(n/2),d})
end function
 
function c3(sequence f3f, integer n, d)
return call_lambda(f3f[1],{3*n+1,d})
end function