Did you know ... Search Documentation:
Pack genutils -- prolog/lazy.pl
PublicShow source
 lazy(+P:pred(+A,+B,-C), X:A, Y:B, -Z:C) is det
Lazy version of call/4, triggered when Z is needed. Goal expansion version allows macro expansion of call(P, ...).
 lazy_unfold(+P:pred(-A1,-A2,+S,-S), -XX1:list(A1), -XX2:list(A2), +S1:S, -S2:S) is det
 lazy_unfold(+P:pred(-A1,+S,-S), -XX1:list(A1), +S1:S, -S2:S) is det
Lazily unfold an infinite stream
 lazy_unfold_finite(+P:pred(-A1,+S,-S), -XX1:list(A1), +S1:S, -S2:S) is det
Lazily unfold a finite list or infinite stream. If unfolding predicate fails, then a finite list is produced.
 lazy_seqmap(+P:pred(A1,A2,S,S), +XX1:list(A1), -XX2:list(A2), S1:S, S2:S) is det
lazy_seqmap(+P:pred(A1,A2,S,S), -XX1:list(A1), -XX2:list(A2), S1:S, S2:S) is nondet
 lazy_seqmap(+P:pred(A1,S,S), -XX1:list(A1), S1:S, S2:S) is nondet
Lazy versions of dcg_core:seqmap//{2,3} - can succeed for any lenght of list. Computation is frozen on last list, which is to be understood as an 'output'.

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 lazy_unfold(Arg1, Arg2, Arg3, Arg4)
 lazy_seqmap(Arg1, Arg2, Arg3, Arg4)
 lazy_maplist(Arg1, Arg2)
 lazy_maplist(Arg1, Arg2, Arg3)
 lazy_maplist(Arg1, Arg2, Arg3, Arg4)
 lazy_repeat(Arg1, Arg2)