mirror of
https://github.com/correl/calrissian.git
synced 2024-11-23 19:19:57 +00:00
More formatting tweaks.
This commit is contained in:
parent
1c9fe229cb
commit
8fbb180c7c
1 changed files with 7 additions and 7 deletions
|
@ -3,13 +3,13 @@
|
||||||
;; Provide the state monad in terms of the state transformer
|
;; Provide the state monad in terms of the state transformer
|
||||||
(''state `(transformer 'state 'identity))
|
(''state `(transformer 'state 'identity))
|
||||||
(_
|
(_
|
||||||
`(list_to_atom (lists:flatten (list "calrissian-"
|
`(list_to_atom (lists:flatten `("calrissian-"
|
||||||
(atom_to_list ,name)
|
,(atom_to_list ,name)
|
||||||
"-monad"))))))
|
"-monad"))))))
|
||||||
|
|
||||||
(defmacro transformer (name inner-monad)
|
(defmacro transformer (name inner-monad)
|
||||||
`(tuple (list_to_atom (lists:flatten (list "calrissian-"
|
`(tuple (list_to_atom (lists:flatten `("calrissian-"
|
||||||
(atom_to_list ,name)
|
,(atom_to_list ,name)
|
||||||
"-transformer")))
|
"-transformer")))
|
||||||
(monad ,inner-monad)))
|
(monad ,inner-monad)))
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
`(call ,monad 'fail ,expr))
|
`(call ,monad 'fail ,expr))
|
||||||
|
|
||||||
(defmacro sequence (monad list)
|
(defmacro sequence (monad list)
|
||||||
`(: lists foldr
|
`(lists:foldr
|
||||||
(lambda (m acc) (mcons ,monad m acc))
|
(lambda (m acc) (mcons ,monad m acc))
|
||||||
(return ,monad [])
|
(return ,monad [])
|
||||||
,list))
|
,list))
|
||||||
|
|
Loading…
Reference in a new issue