diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-07-06 09:53:54 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-07-06 09:53:54 -0700 |
commit | b1d1e6aa735442a1f22a224a3627427aa74b23f3 (patch) | |
tree | 006cb146016f311ee14e099ad2f5e7d38cb2f8ca /txr.1 | |
parent | 3182bdf1e39559179c8e7f97ea9eb5f4bff0ef7f (diff) | |
download | txr-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.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -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 *) |