From: Mark Thom Date: Tue, 27 Mar 2018 00:59:58 +0000 (-0600) Subject: add repeat X-Git-Tag: v0.8.110~511 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=933b94ef8295b013b833fcf8abcc58504960642c;p=scryer-prolog.git add repeat --- 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.