diff options
Diffstat (limited to '')
-rw-r--r-- | source/lux/data/id.lux | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/lux/data/id.lux b/source/lux/data/id.lux index d8bb30a3d..3ad6b056b 100644 --- a/source/lux/data/id.lux +++ b/source/lux/data/id.lux @@ -13,19 +13,20 @@ ## [Types] (deftype #export (Id a) - a) + (| (#Id a))) ## [Structures] (defstruct #export Id/Functor (Functor Id) (def (F;map f fa) - (f fa))) + (let [(#Id a) fa] + (#Id (f a))))) (defstruct #export Id/Monad (Monad Id) (def M;_functor Id/Functor) - (def M;wrap id) - (def M;join id)) + (def (M;wrap a) (#Id a)) + (def (M;join mma) (let [(#Id ma) mma] ma))) (defstruct #export Id/CoMonad (CoMonad Id) (def CM;_functor Id/Functor) - (def CM;unwrap id) - (def CM;split id)) + (def (CM;unwrap wa) (let [(#Id a) wa] a)) + (def (CM;split wa) (#Id wa))) |