summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-10-17 07:20:26 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-10-17 07:20:26 -0700
commit74ea4ee2f89457adbe5cf6facadd8e8b389517ab (patch)
treee4b8672924def8f20843189e703902447557b47c /txr.1
parent3cf82520abdc28d72eba738fdbd819ecd5af566e (diff)
downloadtxr-74ea4ee2f89457adbe5cf6facadd8e8b389517ab.tar.gz
txr-74ea4ee2f89457adbe5cf6facadd8e8b389517ab.tar.bz2
txr-74ea4ee2f89457adbe5cf6facadd8e8b389517ab.zip
doc: opip, flow: note about no-argument case.
* txr.1: It's a developer surprise that (flow x) returns nil rather than x; which is due to the documented behavior of chain, when it has no arguments. Let's add cautionary notes.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.120
1 files changed, 20 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index e57f430a..a15cb390 100644
--- a/txr.1
+++ b/txr.1
@@ -58027,6 +58027,14 @@ and
macros use their macro environment in determining whether a form is a
macro call, thereby respecting lexical scoping.
+Note: an
+.code opip
+form with no arguments specifies a function which returns
+.codn nil ,
+which follows from a documented property of the
+.code chain
+function.
+
.TP* Example:
Take each element from the list
.code "(1 2 3 4)"
@@ -58093,6 +58101,18 @@ is equivalent to the application of an
function to the value of
.metn form .
+Note: if there are no
+.meta opip-arg
+arguments, then
+.code flow
+evaluates the
+.code x
+argument and returns
+.codn nil ;
+which follows from the behavior of
+.code opip
+when that operator is invoked with no arguments.
+
.TP* Examples:
.verb