Continued fraction/Arithmetic/Construct from rational number: Difference between revisions

m
(→‎{{header|REXX}}: re-added the REXX program source text.)
Line 1,327:
Light weight, explicit state:
<lang zkl>fcn r2cf(nom,dnom){ // -->Walker (iterator)
Walker.tweak(fcn(_,state){
nom,dnom:=state;
if(dnom==0) return(Void.Stop);
Line 1,333:
state.clear(dnom,d);
n
}.fp1fp(List(nom,dnom))) // partial application (light weight closure)
}</lang>
Heavy weight, implicit state:
Anonymous user