From 65189fb5a549a4149db9a6b59bd89d2d8009b89b Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 29 Nov 2013 23:15:48 -0800 Subject: * eval.c (eval_init): New functions countqual, countql, countq and count_if registered as intrinsics. * lib.c (countqual, countql, countq, count_if): New functions. * lib.h (countqual, countql, countq, count_if): Declared. * txr.1: New functions documented. --- txr.1 | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index 45780d73..c38de95c 100644 --- a/txr.1 +++ b/txr.1 @@ -6626,6 +6626,21 @@ Examples: [(remql* 13 (range 1)) 0..100] +.SS Functions countqual, countql and countq + +.TP +Syntax: + + (countq ) + (countql ) + (countqual ) + +.TP +Description + +The countq, countql and countqual functions count the number of objects +in which are eq, eql or equal to , and return the count. + .SH APPLICATIVE LIST PROCESSING .SS Functions remove-if, keep-if, remove-if* and keep-if* @@ -6676,6 +6691,24 @@ Examples: '(("abcd" 4) ("defg" 5))) -> (("defg 5)) +.SS Function count-if + +.TP +Syntax: + + (count-if : ) + +.TP +Description: + +The countove-if function counts the numer of elements of which satisfy + and returns the count. + +The optional specifies how each element from the is +transformed to an argument to . If this argument is omitted +or specified as nil, then the predicate function is applied to the elements +directly, a behavior which is identical to being (fun identity). + .SS Function tree-find .TP -- cgit v1.2.3