picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

commit bdb28af9d0d8283019b409f9ed4e60ebfccc57b0
parent bbc1153e723dc70c9a77e3b1aca9a75a724b5eea
Author: Alexander Burger <abu@software-lab.de>
Date:   Fri, 30 Mar 2012 17:58:32 +0200

Minor doc clarification for 'repeat/0'
Diffstat:
Mdoc/refR.html | 16+++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/doc/refR.html b/doc/refR.html @@ -469,8 +469,10 @@ href="refR.html#replace">replace</a></code>. <dt><a name="repeat"><code>(repeat) -> lst</code></a> <dd>Makes the current <a href="ref.html#pilog">Pilog</a> definition "tail -recursive", by closing the previously defined clauses in the T property to a -circular list. See also <code><a href="refB.html#be">be</a></code>. +recursive", by closing the previously defined rules in the definition's T +property to a circular list. See also <code><a +href="refR.html#repeat/0">repeat/0</a></code>. <code><a +href="refB.html#be">be</a></code>. <pre><code> (be a (1)) # Define three facts @@ -494,13 +496,13 @@ backtracking. See also <code><a href="refR.html#repeat">repeat</a></code> and <code><a href="refT.html#true/0">true/0</a></code>. <pre><code> -: (be int (@N) # Generate unlimited supply of integers - (@ zero *N) +: (be integer (@I) # Generate unlimited supply of integers + (@C box 0) # Init to zero (repeat) # Repeat from here - (@N inc '*N) ) --> int + (@I inc (-> @C)) ) +-> integer -: (? (int @X)) +: (? (integer @X)) @X=1 @X=2 @X=3