summaryrefslogtreecommitdiff
path: root/test.scm
diff options
context:
space:
mode:
authorrekado <rekado@elephly.net>2014-10-30 20:22:54 +0100
committerrekado <rekado@elephly.net>2014-10-30 20:22:54 +0100
commit77cb84cd32cf8e4e7645c25bc580ceec7921eec5 (patch)
tree75f91e66f75f6e14f5606ef48f24984a92126785 /test.scm
parent55c479f841df1db6400802b7953de833b6fc038d (diff)
rename 'with-monad:' to 'with-monad'HEADmaster
Diffstat (limited to 'test.scm')
-rw-r--r--test.scm56
1 files changed, 28 insertions, 28 deletions
diff --git a/test.scm b/test.scm
index c0e7297..02f5f0a 100644
--- a/test.scm
+++ b/test.scm
@@ -16,47 +16,47 @@
(begin
(test "maybe 1"
- '(with-monad: maybe-monad
- (a <- (Just 5))
- (b <- (f 2))
- (c <- (Just 10))
- (return (+ a b c)))
+ '(with-monad maybe-monad
+ (a <- (Just 5))
+ (b <- (f 2))
+ (c <- (Just 10))
+ (return (+ a b c)))
(Just 17))
(test "maybe 2"
- '(with-monad: maybe-monad
- (a <- (Just 5))
- (b <- (f 0))
- (c <- (Just 10))
- (return (+ a b c)))
+ '(with-monad maybe-monad
+ (a <- (Just 5))
+ (b <- (f 0))
+ (c <- (Just 10))
+ (return (+ a b c)))
(Nothing))
(test "state 1"
- '(run-state 0 (with-monad: state-monad
- (put 10)
- (put 9)
- (modify (lambda (x) (+ 2 x)))
- (modify (lambda (x) (+ 2 x)))
- (get)))
+ '(run-state 0 (with-monad state-monad
+ (put 10)
+ (put 9)
+ (modify (lambda (x) (+ 2 x)))
+ (modify (lambda (x) (+ 2 x)))
+ (get)))
13)
(test "state 2"
- '(run-state 10 (with-monad: state-monad
- (get)))
+ '(run-state 10 (with-monad state-monad
+ (get)))
10)
(test "either 1"
- '(with-monad: either-monad
- (a <- (Right 5))
- (b <- (Right 0))
- (c <- (Right 10))
- (return (+ a b c)))
+ '(with-monad either-monad
+ (a <- (Right 5))
+ (b <- (Right 0))
+ (c <- (Right 10))
+ (return (+ a b c)))
(Right 15))
(test "either 2"
- '(with-monad: either-monad
- (a <- (Right 5))
- (b <- (Left "an error"))
- (c <- (Right 10))
- (return (+ a b c)))
+ '(with-monad either-monad
+ (a <- (Right 5))
+ (b <- (Left "an error"))
+ (c <- (Right 10))
+ (return (+ a b c)))
(Left "an error")))