view sequences/lazy_cons.m @ 2:7357e1dc2ad6

Simplified scheduler library with new schedule representation.
author samer
date Sat, 22 Dec 2012 16:17:51 +0000
parents 672052bd81f8
children 3f77126f7b5f
line wrap: on
line source
function Y=lazy_cons(X,Z)
% lazy_cons - Make sequence given head and tail
%
% lazy_cons :: A, (unit -> seq A) -> seq A.

Y=data(size(X),'datafn',@(o)X,'nextfn',@(o)Z(), ...
	'charfn',@(o)[tostring(X) ' | ' tostring(Z) '()']);