summaryrefslogtreecommitdiffstats
path: root/stdlib
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-07-18 06:15:49 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-07-18 06:15:49 -0700
commit1fcd2951cbca8b1a72b0a7665032859139f03d10 (patch)
tree12e4d72a84f2f32495bd0a0e1790ebe1d92e52cb /stdlib
parent980942732a366f2042eac777b2d1e259a19d3652 (diff)
downloadtxr-1fcd2951cbca8b1a72b0a7665032859139f03d10.tar.gz
txr-1fcd2951cbca8b1a72b0a7665032859139f03d10.tar.bz2
txr-1fcd2951cbca8b1a72b0a7665032859139f03d10.zip
New function: count.
The general count function, with keyfun and testfun, is noticeably absent. Let's implement it. * lib.[ch] (count): New function. * eval.c (eval_init): Register count intrinsic. * tests/012/seq.tl: Some tests for count. * txr.1: Add count to count-if section. Revise documentation based on pos/pos-if. * stdlib/doc-syms.tl: Updated.
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/doc-syms.tl3
1 files changed, 2 insertions, 1 deletions
diff --git a/stdlib/doc-syms.tl b/stdlib/doc-syms.tl
index ba518652..4efb6391 100644
--- a/stdlib/doc-syms.tl
+++ b/stdlib/doc-syms.tl
@@ -404,7 +404,8 @@
("copy-vec" "N-010E7635")
("cos" "D-0021")
("cosh" "D-0081")
- ("count-if" "N-00BBC726")
+ ("count" "N-00AE0CB6")
+ ("count-if" "N-00AE0CB6")
("count-until-match" "N-00EFD668")
("countq" "N-01DF131F")
("countql" "N-01DF131F")