summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--mew.scm4
-rw-r--r--tests/test.mew2
2 files changed, 4 insertions, 2 deletions
diff --git a/mew.scm b/mew.scm
index 17c23d2..0780029 100644
--- a/mew.scm
+++ b/mew.scm
@@ -1001,10 +1001,10 @@
                   (apply and=> result (cdr fs)))))))
 
   (define-syntax fun=>-inner
-    (syntax-rules ()
+    (syntax-rules (unquote)
       ((_ (acc ...))
        (compose acc ...))
-      ((_ (acc ...) ,arg args ...)
+      ((_ (acc ...) (unquote arg) args ...)
        (fun=>-inner (arg acc ...) args ...))
       ((_ (acc ...) (arg ...) args ...)
        (fun=>-inner ((op arg ...) acc ...) args ...))
diff --git a/tests/test.mew b/tests/test.mew
index 32d9df1..c01bb08 100644
--- a/tests/test.mew
+++ b/tests/test.mew
@@ -547,6 +547,8 @@
 
 (test-group "op=>"
   (test 42 (op=> 40 (+ _ 1) inc))
+  (test 42 (op=> 40 (inc _) inc))
+  (test 42 (op=> 40 ,(op inc _) inc))
   (test #f (op=> 40 inc even?))
   (test 43 (op=> '(6 7) (apply * _) inc))
   (test 42 (op=> 42)))