summary refs log tree commit diff
path: root/tests/monads.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-09-04 18:31:06 +0200
committerLudovic Courtès <ludo@gnu.org>2015-09-04 18:31:06 +0200
commitdbbc248aeef1bc3b5d76268782acff43e9d71d57 (patch)
treed09e9e6e4e8138b6837cc024c69c599f58c38aa9 /tests/monads.scm
parent3b6eddb2b27beacf462e9c254ebc6d612dac0129 (diff)
downloadguix-dbbc248aeef1bc3b5d76268782acff43e9d71d57.tar.gz
monads: Fix 'liftN' fallback case.
Reported by Andy Wingo <wingo@igalia.com>.

* guix/monads.scm (define-lift) <fallback case>: Add missing #'.  Remove
  extra formal parameter.
* tests/monads.scm ("lift"): Add test with 'lift1' as a procedure.
Diffstat (limited to 'tests/monads.scm')
-rw-r--r--tests/monads.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/monads.scm b/tests/monads.scm
index d3ef065f24..62a07a2bc6 100644
--- a/tests/monads.scm
+++ b/tests/monads.scm
@@ -95,10 +95,12 @@
 
 (test-assert "lift"
   (every (lambda (monad run)
-           (let ((f (lift1 1+ monad)))
+           (let ((f (lift1 1+ monad))
+                 (g (apply lift1 1+ (list monad))))
              (with-monad monad
                (let ((number (random 777)))
                  (= (run (>>= (return number) f))
+                    (run (>>= (return number) g))
                     (1+ number))))))
          %monads
          %monad-run))