diff options
author | Leah Neukirchen <leah@vuxu.org> | 2022-11-18 19:55:47 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2022-11-18 19:55:47 +0100 |
commit | b1605ef9a7f21e7caf3d033b5ac7df0b8da5c3fe (patch) | |
tree | 426963e177ae2aade02a6d97ba70a893607de74f /mew.svnwiki | |
parent | 3779df17f2726c2ad4c6904016f2b27c5049ed0d (diff) | |
download | mew-b1605ef9a7f21e7caf3d033b5ac7df0b8da5c3fe.tar.gz mew-b1605ef9a7f21e7caf3d033b5ac7df0b8da5c3fe.tar.xz mew-b1605ef9a7f21e7caf3d033b5ac7df0b8da5c3fe.zip |
add xfold, xfold-right, xreduce, xreduce-right, xscan, xscan-right
Make scan, scan-right work with multiple lists.
Diffstat (limited to 'mew.svnwiki')
-rw-r--r-- | mew.svnwiki | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mew.svnwiki b/mew.svnwiki index f11e5d6..c10a557 100644 --- a/mew.svnwiki +++ b/mew.svnwiki @@ -253,6 +253,19 @@ Returns true if {{<va>}} is an unspecified value, else false. <procedure>(scan-right <kons> <knil> <lists>...)</procedure> Like {{fold}}/{{fold-right}}, but collects all accumulator values. +Prefer {{xscan}}/{{xscan-right}}. + +<procedure>(xfold <kons> <knil> <lists>...)</procedure> +<procedure>(xfold-right <kons> <knil> <lists>...)</procedure> +<procedure>(xreduce <kons> <knil> <lists>...)</procedure> +<procedure>(xreduce-right <kons> <knil> <lists>...)</procedure> +<procedure>(xscan <kons> <knil> <lists>...)</procedure> +<procedure>(xscan-right <kons> <knil> <lists>...)</procedure> + +Like {{fold}}/{{fold-right}}/{{reduce}}/{{reduce-right}}/{{scan}}/{{scan-right}}, +but {{<kons>}} always takes the accumulator as first arguments, +and the items after. This is more practical when multiple {{lists}} +are passed. <syntax>(imp <antedecent>... <consequent>)<syntax> |