fugit/1
Time a command
flow/1
Trace plain code
flow/3
Trace DCG code
The basic prolog tools for list manipulation are normally defined to process the list one element at a time. However, when the individual list elements are not of interest, as in the following:
then it is quicker to process long lists in chunks.
Those primitives are defined here as alternatives to the standard library and operate on chunks up to eight elements at a time. They are intended to be fully bilateral.
iota(Start, Finish, List)
produces a List of integers increasing or decreasing in unit steps from Start to Finish.
in(Element, List)
is the same as member(Element, List).
in(Element, iota(Start, Finish))
is the same as: iota(Start, Finish, List), member(Element, List).
These are repeat - fail operations which are only useful for producing side effects Being failure driven, they can be nested.
do(while(Condition), Goals)
do(Goals, while(Condition))