diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-06-20 06:48:06 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-06-20 06:48:06 -0700 |
commit | e21a452a9c75074ab7eff33b70950aecf3f3c309 (patch) | |
tree | 5b8f5301ce2584532ae1b8858833ca420b948535 /txr.1 | |
parent | 2a9b3bca2622a54434cc16e7c70dce37b1c4d205 (diff) | |
download | txr-e21a452a9c75074ab7eff33b70950aecf3f3c309.tar.gz txr-e21a452a9c75074ab7eff33b70950aecf3f3c309.tar.bz2 txr-e21a452a9c75074ab7eff33b70950aecf3f3c309.zip |
* eval.c (do_apf, apf): New functions.
(eval_init): Register apf as intrinsic.
* txr.1: Document apf.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -11957,6 +11957,8 @@ except that the symbol args is to be understood as a generated symbol (gensym). The ap macro nests properly with op and do, in any combination, in regard to the @@n notation. +See also: the apf function. + .SS Macro ret .TP @@ -12157,6 +12159,31 @@ Example: ;; the function returned by (retf 42) ignores 1 2 3 and returns 42. (call (retf 42) 1 2 3) -> 42 +.SH Function apf + +.TP +Syntax: + + (apf <function>) + +.TP +Description: + +The apf function returns a one-argument function which accepts +a list. When the function is called, it treats the list as +argument which are applied to <function>. It returns whatever +<function> returns. + +See also: the ap macro. + +.TP +Example: + + ;; Function returned by [apf +] accepts (1 2 3) list and + ;; applies it to +, as if (+ 1 2 3) were called. + + (call [apf +] '(1 2 3)) -> 6 + .SH INPUT AND OUTPUT (STREAMS) TXR Lisp supports input and output streams of various kinds, with |