diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-09-18 22:54:47 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-09-18 22:54:47 -0700 |
commit | 34a8e91898d551d036742fd6fb45c57b8e95ad52 (patch) | |
tree | 472850b44473d47e221d12e75f2c1e8d34de712c /txr.1 | |
parent | d8ef238e540a00b77d7c66645b266922a5ecd6fa (diff) | |
download | txr-34a8e91898d551d036742fd6fb45c57b8e95ad52.tar.gz txr-34a8e91898d551d036742fd6fb45c57b8e95ad52.tar.bz2 txr-34a8e91898d551d036742fd6fb45c57b8e95ad52.zip |
New function: flatcar.
* eval.c (eval_init): Register flatcar intrinsic.
* lib.c (flatcar): New function.
* lib.h (flatcar): Declared.
* txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -14762,6 +14762,40 @@ structure is itself lazy. (flatten '(((()) ()))) -> nil .cble +.coNP Function @ flatcar +.synb +.mets (flatcar << tree ) +.syne +.desc +The +.code flatcar +function produces a list of all the atoms contained in the +tree structure +.metn tree , +in the order in which they appear, when the structure is traversed +left to right. + +This list includes those +.code nil +atoms which appear in +.code car +fields. + +The list excludes +.code nil +atoms which appear in +.code cdr +fields. + +.TP* Examples: +.cblk + (flatcar '(1 2 () (3 4))) -> (1 2 nil 3 4) + + (flatcar '(a (b . c) d (e) (((f)) . g) (nil . z) nil . h)) + + --> (a b c d e f g nil z nil h) +.cble + .coNP Function @ tree-find .synb .mets (tree-find < obj < tree << test-function ) |