summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-07-06 09:53:54 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-07-06 09:53:54 -0700
commitb1d1e6aa735442a1f22a224a3627427aa74b23f3 (patch)
tree006cb146016f311ee14e099ad2f5e7d38cb2f8ca
parent3182bdf1e39559179c8e7f97ea9eb5f4bff0ef7f (diff)
downloadtxr-b1d1e6aa735442a1f22a224a3627427aa74b23f3.tar.gz
txr-b1d1e6aa735442a1f22a224a3627427aa74b23f3.tar.bz2
txr-b1d1e6aa735442a1f22a224a3627427aa74b23f3.zip
doc: op: incorrect example.
* txr.1: Switch op example to ap and move under description of ap, which needs an example anyway. Add new examples for op. Reported by user vapnik spaknik.
-rw-r--r--txr.119
1 files changed, 14 insertions, 5 deletions
diff --git a/txr.1 b/txr.1
index 5bdf24a6..f1d6c1ec 100644
--- a/txr.1
+++ b/txr.1
@@ -45044,15 +45044,15 @@ from a quasiliteral within a nested
(op ... (op ... `@@@1`))
.brev
-.TP* Example:
+.TP* Examples:
.verb
- ;; Take a list of pairs and produce a list in which those pairs
- ;; are reversed.
+ (let ((c 0))
+ (mapcar (op cons (inc c)) '(a b c)))
+ --> ((1 . a) (2 . b) (3 . c))
- (mapcar (op list @2 @1) '((1 2) (a b))) -> ((2 1) (b a))
+ (reduce-left (op + (* 10 @1) @2) '(1 2 3)) --> 123
.brev
-
.coNP Macro @ lop
.synb
.mets (lop << form +)
@@ -45230,6 +45230,15 @@ and
.code ipf
functions.
+.TP* Example:
+
+.verb
+ ;; Take a list of pairs and produce a list in which those pairs
+ ;; are reversed.
+
+ (mapcar (ap list @2 @1) '((1 2) (a b))) -> ((2 1) (b a))
+.brev
+
.coNP Macros @ opip and @ oand
.synb
.mets (opip << clause *)