summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-10-28 07:00:26 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-10-28 07:00:26 -0700
commit374509f247df16d40d2535a34237fa2f5dd5863e (patch)
treecb540398c3b0bb5b4826c21edac6621e4fb483a1 /txr.1
parent6dfa89ab06bd72ae6e476306637e9e98bcf5799a (diff)
downloadtxr-374509f247df16d40d2535a34237fa2f5dd5863e.tar.gz
txr-374509f247df16d40d2535a34237fa2f5dd5863e.tar.bz2
txr-374509f247df16d40d2535a34237fa2f5dd5863e.zip
New function: identity*
An version of identity with lax argument conventions. * eval.c (eval_init): Register identity* intrinsic. * lib.c (identity_star_f): New symbol variable. (identity_star): New function. (obj_init): gc-protect identity_star_f variable, and initialize it. * lib.h (identity_star_f): Declared. * txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.111
1 files changed, 9 insertions, 2 deletions
diff --git a/txr.1 b/txr.1
index c4d2dd98..2cf8eb8c 100644
--- a/txr.1
+++ b/txr.1
@@ -17743,9 +17743,10 @@ previous clauses match.
.SS* Object Equivalence
-.coNP Functions @ identity and @ use
+.coNP Functions @, identity @ identity and @ use
.synb
.mets (identity << value )
+.mets (identity* << value *)
.mets (use << value )
.syne
.desc
@@ -17753,9 +17754,15 @@ The
.code identity
function returns its argument.
+If the
+.code identity*
+function is given at least one argument, then it returns its
+leftmost argument, otherwise it returns nil.
+
The
.code use
-function is a synonym.
+function is a synonym of
+.codn identity .
.TP* Notes:
The