diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-02-02 19:30:15 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-02-02 19:30:15 -0800 |
commit | afec17f4310c5eaaa326aacab2d5bb18cafd315c (patch) | |
tree | 867cf4c8afd1d20e6796d66f20a1b70ce2faae6e /tests/012 | |
parent | fb8b7312de0fa42fe9b544aca54d1ee05518bf40 (diff) | |
download | txr-afec17f4310c5eaaa326aacab2d5bb18cafd315c.tar.gz txr-afec17f4310c5eaaa326aacab2d5bb18cafd315c.tar.bz2 txr-afec17f4310c5eaaa326aacab2d5bb18cafd315c.zip |
New function: hist-sort-by.
* eval.c (eval_init): Register hist-sort-by intrinsic.
* lib.c (hist_sort_by): New function.
(hist_sort): Wrapper for hist_sort_by now.
* lib.h (hist_sort_by): Declared.
* tests/012/sort.tl: Tests.
* txr.1: Documented.
Diffstat (limited to 'tests/012')
-rw-r--r-- | tests/012/sort.tl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/012/sort.tl b/tests/012/sort.tl index 92811715..bca4a3d8 100644 --- a/tests/012/sort.tl +++ b/tests/012/sort.tl @@ -93,3 +93,6 @@ (hist-sort nil) nil (hist-sort '(3 4 5)) ((3 . 1) (4 . 1) (5 . 1)) (hist-sort '("a" "b" "c" "a" "b" "a" "b" "a")) (("a" . 4) ("b" . 3) ("c" . 1))) + +(test + [hist-sort-by upcase-str '("a" "b" "c" "a" "b" "a" "b" "a")] (("A" . 4) ("B" . 3) ("C" . 1))) |