blob: 6f1fc60efacc20bfbc4023dff23c4fd649e2d68d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
(.module:
[lux #*
[control
[functor (#+ Functor)]
[apply (#+ Apply)]
["M" monad #*]
["CM" comonad #*]]])
## [Types]
(type: #export (Identity a)
a)
## [Structures]
(structure: #export functor (Functor Identity)
(def: map id))
(structure: #export apply (Apply Identity)
(def: &functor ..functor)
(def: (apply ff fa)
(ff fa)))
(structure: #export monad (Monad Identity)
(def: &functor ..functor)
(def: wrap id)
(def: join id))
(structure: #export comonad (CoMonad Identity)
(def: &functor ..functor)
(def: unwrap id)
(def: split id))
|