From 061d34050fcedfec5ceaf6e46657775a3cc4246a Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 17 Oct 2022 07:20:26 -0700 Subject: 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. --- txr.1 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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 -- cgit v1.2.3