LazyTransformer(IPersistentMap meta, object first, LazyTransformer rest) : base(meta) { _stepper = null; _first = first; _rest = rest; }
public override Object invoke(Object result) { LazyTransformer lt = (LazyTransformer)result; lt._stepper = null; return(lt); }
public override Object invoke(Object result) { LazyTransformer lt = (LazyTransformer)(RT.isReduced(result)? ((Reduced)result).deref():result); lt._stepper = null; return(lt); }
public override Object invoke(Object result, Object input) { LazyTransformer lt = (LazyTransformer)result; lt._first = input; lt._rest = new LazyTransformer(lt._stepper); lt._stepper = null; return(lt._rest); }
public void step(LazyTransformer lt) { while (lt._stepper != null && MoveNext()) { if (RT.isReduced(_xform.applyTo(RT.cons(lt, Current())))) { if (lt._rest != null) { lt._rest._stepper = null; } break; } } if (lt._stepper != null) { _xform.invoke(lt); } }
public void step(LazyTransformer lt) { while (lt._stepper != null && MoveNext()) { if (RT.isReduced(_xform.applyTo(RT.cons(lt, Current())))) { lt._stepper = null; LazyTransformer et = lt; while (et._rest != null) { et = et._rest; et._stepper = null; } _xform.invoke(et); return; } } if (lt._stepper != null) { _xform.invoke(lt); } }