mirror of
https://github.com/correl/calrissian.git
synced 2024-11-23 11:09:58 +00:00
Removed trailing whitespace.
This commit is contained in:
parent
572022bf98
commit
e23ab8f448
1 changed files with 5 additions and 5 deletions
|
@ -43,32 +43,32 @@
|
|||
(f (lambda (n) (return ,monad (* 3 n)))))
|
||||
(is-equal-m ,monad (>>= ,monad (return ,monad a) f)
|
||||
(funcall f a))))
|
||||
|
||||
|
||||
(deftest monad-right-identity
|
||||
(let ((m (return ,monad 3)))
|
||||
(is-equal-m ,monad (>>= ,monad m (lambda (m') (return ,monad m')))
|
||||
m)))
|
||||
|
||||
|
||||
(deftest monad-associativity
|
||||
(let ((m (return ,monad 3))
|
||||
(f (lambda (n) (return ,monad (* 3 n))))
|
||||
(g (lambda (n) (return ,monad (+ 5 n)))))
|
||||
(is-equal-m ,monad (>>= ,monad (>>= ,monad m f) g)
|
||||
(>>= ,monad m (lambda (x) (>>= ,monad (funcall f x) g))))))
|
||||
|
||||
|
||||
(deftest monad-do-left-identity
|
||||
(let ((a 3)
|
||||
(f (lambda (n) (return ,monad (* 3 n)))))
|
||||
(is-equal-m ,monad (do-m ,monad (a' <- (return ,monad a))
|
||||
(funcall f a'))
|
||||
(do-m ,monad (funcall f a)))))
|
||||
|
||||
|
||||
(deftest monad-do-right-identity
|
||||
(let ((m (return ,monad 3)))
|
||||
(is-equal-m ,monad (do-m ,monad (x <- m)
|
||||
(return ,monad x))
|
||||
(do-m ,monad m))))
|
||||
|
||||
|
||||
(deftest monad-do-associativity
|
||||
(let ((m (return ,monad 3))
|
||||
(f (lambda (n) (return ,monad (* 3 n))))
|
||||
|
|
Loading…
Reference in a new issue