samer@42: % unfolder - arrow to generate sequence by unfolding state samer@0: % samer@0: % unfolder :: samer@0: % (S -> B, S) ~'function to state to output and next state', samer@0: % S ~'initial state' samer@0: % -> arrow({},{B},S) ~'arrow from A to B with state of type S'. samer@0: samer@0: function o=unfolder(fn,s0) samer@0: s.fn=fn; s.s0=s0; samer@0: o=class(s,'unfolder',arrow(0,1)); samer@0: end samer@0: