protocol
loopp
ï
Loop control constructs protocol.
logtalk_load(loops(loader))
static
Public predicatesï
whiledo/2
ï
While Condition
is true do Action
.
static
whiledo(Condition,Action)
whiledo(0,0)
whiledo(+callable,@callable)
- zero_or_one
dowhile/2
ï
Do Action
while Condition
is true.
static
dowhile(Action,Condition)
dowhile(0,0)
dowhile(@callable,+callable)
- zero_or_one
foreach/3
ï
For each Element
in List
call Goal
.
static
foreach(Element,List,Goal)
foreach(*,*,0)
foreach(@var,+list(term),@callable)
- zero_or_one
foreach/4
ï
For each Element
in List
at position Index
call Goal
. Index
starts at 1.
static
foreach(Element,Index,List,Goal)
foreach(*,*,*,0)
foreach(@var,@var,+list(term),@callable)
- zero_or_one
forto/3
ï
Calls Goal
counting up from First
to Last
. Increment is 1. For convenience, First
and Last
can be arithmetic expressions. Fails iff Goal
fails.
static
forto(First,Last,Goal)
forto(*,*,0)
forto(+number,+number,@callable)
- zero_or_one
forto/4
ï
Calls Goal
counting up from First
to Last
and binding Count
to each successive value. Increment is 1. For convenience, First
and Last
can be arithmetic expressions. Fails iff Goal
fails.
static
forto(Count,First,Last,Goal)
forto(*,*,*,0)
forto(@var,+number,+number,@callable)
- zero_or_one
forto/5
ï
Calls Goal
counting up from First
to Last
and binding Count
to each successive value. For convenience, First
, Last
, and Increment
can be arithmetic expressions (uses Increment
absolute value). Fails iff Goal
fails.
static
forto(Count,First,Last,Increment,Goal)
forto(*,*,*,*,0)
forto(@var,+number,+number,+number,@callable)
- zero_or_one
fordownto/3
ï
Calls Goal
counting down from First
to Last
. Decrement is 1. For convenience, First
and Last
can be arithmetic expressions. Fails iff Goal
fails.
static
fordownto(First,Last,Goal)
fordownto(*,*,0)
fordownto(+number,+number,@callable)
- zero_or_one
fordownto/4
ï
Calls Goal
counting down from First
to Last
and binding Count
to each successive value. Decrement is 1. For convenience, First
and Last
can be arithmetic expressions. Fails iff Goal
fails.
static
fordownto(Count,First,Last,Goal)
fordownto(*,*,*,0)
fordownto(@var,+number,+number,@callable)
- zero_or_one
fordownto/5
ï
Calls Goal
counting down from First
to Last
and binding Count
to each successive value. For convenience, First
, Last
, and Decrement
can be arithmetic expressions (uses Decrement
absolute value). Fails iff Goal
fails.
static
fordownto(Count,First,Last,Decrement,Goal)
fordownto(*,*,*,*,0)
fordownto(@var,+number,+number,+number,@callable)
- zero_or_one
Protected predicatesï
(none)
Private predicatesï
(none)
Operatorsï
(none)
See also