From 933b94ef8295b013b833fcf8abcc58504960642c Mon Sep 17 00:00:00 2001 From: Mark Thom Date: Mon, 26 Mar 2018 18:59:58 -0600 Subject: [PATCH] add repeat --- README.md | 1 + src/prolog/lib/control.pl | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) 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. -- 2.54.0