This module provides implementations of list predicates that
work with lists whos tails are uninstantiated until unified.
Implemented using delayed goals (freeze/2).
The following predicates are re-exported from other modules
- member(?Elem, ?List)
- True if Elem is a member of List. The SWI-Prolog definition
differs from the classical one. Our definition avoids unpacking
each list element twice and provides determinism on the last
element. E.g. this is deterministic:
- - Gertjan van Noord
The following predicates are exported, but not or incorrectly documented.
- map(Arg1, Arg2, Arg3)
- map(Arg1, Arg2, Arg3, Arg4)
- repeat(Arg1, Arg2)
- singleton(Arg1, Arg2)
- head(Arg1, Arg2)
- tail(Arg1, Arg2)
- decons(Arg1, Arg2, Arg3)
- cons(Arg1, Arg2, Arg3)