summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2022-11-18 20:05:29 +0100
committerLeah Neukirchen <leah@vuxu.org>2022-11-18 20:05:29 +0100
commit66cd2fda549d7708acb8685933e619b0922885d5 (patch)
treeab3f946810780b6174cb6b847ec684efbcc191dc /tests
parentb1605ef9a7f21e7caf3d033b5ac7df0b8da5c3fe (diff)
downloadmew-66cd2fda549d7708acb8685933e619b0922885d5.tar.gz
mew-66cd2fda549d7708acb8685933e619b0922885d5.tar.xz
mew-66cd2fda549d7708acb8685933e619b0922885d5.zip
add generator-xfold
Diffstat (limited to 'tests')
-rw-r--r--tests/test.mew4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test.mew b/tests/test.mew
index e638377..ddf376c 100644
--- a/tests/test.mew
+++ b/tests/test.mew
@@ -435,6 +435,10 @@
   (test 43 ((per * inc) 6 7))
   (test 42 ((per) 42)))
 
+(test-group "generator-xfold"
+  (test -10 (generator-xfold - 0 (generator 1 2 3 4)))
+  (test '((((() 1 5) 2 6) 3 7) 4 8) (generator-xfold list '() (generator 1 2 3 4) (generator 5 6 7 8))))
+
 (test-group "inject"
   (test 10 ((inject +) (generator 1 2 3 4)))
   (test 0 ((inject +) (generator)))