summary refs log tree commit diff
path: root/mew.scm
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2022-12-07 00:33:16 +0100
committerLeah Neukirchen <leah@vuxu.org>2022-12-07 00:33:44 +0100
commit3119e2a2b550919326f7850242a6083c81a9b1fa (patch)
treef51aab3495b5b70b1f8f61af616afe3fcff088ed /mew.scm
parentcb824d94d9d5a81acb498b6b9462a318ac4d23aa (diff)
downloadmew-3119e2a2b550919326f7850242a6083c81a9b1fa.tar.gz
mew-3119e2a2b550919326f7850242a6083c81a9b1fa.tar.xz
mew-3119e2a2b550919326f7850242a6083c81a9b1fa.zip
app: allow empty arguments
Diffstat (limited to 'mew.scm')
-rw-r--r--mew.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/mew.scm b/mew.scm
index 5828f36..17c23d2 100644
--- a/mew.scm
+++ b/mew.scm
@@ -1,6 +1,6 @@
 (module mew
   (export
-     act accumulate andloc at
+     act accumulate andloc app at
      boolean
      comp cross-product
      dec def del-at div
@@ -97,7 +97,6 @@
                assoc
                member)
       (lambda fun)
-      (apply app)
       (ceiling ceil)
       (truncate trunc)
       ))
@@ -179,6 +178,11 @@
             (display " "))
           (loop (cdr args) (car args))))))
 
+  (define (app f . args)
+    (if (null? args)
+      (f)
+      (apply apply f args)))
+
   (define-syntax seq
     (syntax-rules ()
       ((_)