This module provides several predicates that make easier to develop predicates that will be executed lazily.
Usage:nums_from(X,List)
List is unified with an infinite list of successive numbers starting in X
Usage:nums_from_inc(X,Y,List)
List is unified with an infinite list of successive numbers starting in X with an increment of Y
Usage:repeat(X,List)
List is unified with an infinite list of the term Y
Usage:cycle(X,List)
List is unified with an infinite list of the term Y repeated infinite times
Usage:take(X,ListA,ListR)
ListR is unified with the first X elements of the infinite list ListA
Usage:takeWhile(P,ListA,ListR)
ListR is unified with the first elements of the infinite list ListA while the condition P is true
Usage:drop(X,ListA,ListR)
ListR is unified with the infinite list ListA dropping the first X elements
Usage:dropWhile(P,ListA,ListR)
ListR is unified with the infinite list ListA dropping the first elements while the condition P is true
Usage:splitAt(X,ListA,Res)
Res is unified with a tuple of lists where the first list is composed by the first X elements of the list ListA and the second list is composed by the rest of the elements of ListA
Usage:span(P,ListA,Res)
Res is unified with a tuple of lists where the first list is composed by the elements of ListA which verify the condition P and the second list is composed by the rest of the elements of the initial list
Usage:tail(ListA,ListR)
ListR is unified with the tail of the infinite list ListA
Usage:lazy_map(ListA,P,ListR)
Version of the map/3 predicate to be executed lazily
Usage:lazy_foldr(P,Xs,V0,V)
Lazy version of foldr/4
Usage:lazy_foldl(P,Xs,V0,V)
Lazy version of foldl/4
Usage:zipWith(P,ListA,ListB,ListR)
ListR is a list whose elements are calculated from the function P and the elements of input lists ListA and ListB occuring at the same position in both lists