summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-12-22 08:47:15 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-12-22 08:47:15 -0800
commit71fa83d6e0fe5ef0964d8f4d54c62eb19a5678a6 (patch)
treec068237782281a86294e4c34ba7959704d18e670
parent04ecd6da969adbe33198c5e46178a1bf068398dd (diff)
downloadtxr-71fa83d6e0fe5ef0964d8f4d54c62eb19a5678a6.tar.gz
txr-71fa83d6e0fe5ef0964d8f4d54c62eb19a5678a6.tar.bz2
txr-71fa83d6e0fe5ef0964d8f4d54c62eb19a5678a6.zip
doc: fix example comment under ifa
* txr.1: The "Rule 7" example is actually triggering Rule 6. Fix comment and add a Rule 7 example.
-rw-r--r--txr.19
1 files changed, 8 insertions, 1 deletions
diff --git a/txr.1 b/txr.1
index f2cf1ad1..d15c3ef7 100644
--- a/txr.1
+++ b/txr.1
@@ -14129,7 +14129,7 @@ form.
.cblk
(ifa t 1 0) -> 1
- ;; Rule 7: it binds to (* x x), which is
+ ;; Rule 6: it binds to (* x x), which is
;; the only it-candidate.
(let ((x 6) (y 49))
(ifa (> y (* x x)) ;; it binds to (* x x)
@@ -14147,6 +14147,13 @@ form.
(list it))
-> (4)
+ ;; Rule 7: no candidates: choose leftmost
+ (let ((x 6) (y 49))
+ (ifa (< 1 x y)
+ (list it)))
+ -> (1)
+
+ -> (4)
;; Violation of Rule 1:
;; while is not a function
(ifa (while t (print 42))