diff --git a/README.md b/README.md index 829ea099..c1614ee3 100644 --- a/README.md +++ b/README.md @@ -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` diff --git a/src/prolog/lib/control.pl b/src/prolog/lib/control.pl index 1501bb81..2c1b113d 100644 --- a/src/prolog/lib/control.pl +++ b/src/prolog/lib/control.pl @@ -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.