add repeat

This commit is contained in:
Mark Thom
2018-03-26 18:59:58 -06:00
parent 2691382771
commit 933b94ef82
2 changed files with 5 additions and 1 deletions

View File

@@ -150,6 +150,7 @@ The following predicates are built-in to rusty-wam.
* `nonvar/1`
* `once/1`
* `rational/1`
* `repeat/0`
* `reverse/2`
* `select/3`
* `setup_call_cleanup/3`

View File

@@ -1,4 +1,4 @@
:- module(control, [(\=)/2, between/3, call_cleanup/2, once/1]).
:- module(control, [(\=)/2, between/3, call_cleanup/2, once/1, repeat/0]).
:- op(700, xfx, \=).
@@ -15,3 +15,6 @@ between(Lower1, Upper, X) :-
Lower1 < Upper,
Lower2 is Lower1 + 1,
between(Lower2, Upper, X).
repeat.
repeat :- repeat.