on 492ae2f help sign in
33 lines 471 B history raw
1### `++unit`
3Maybe
5mold generator. A `++unit` is either `~` or `[~ u=a]` where `a` is the
6type that was passed in.
9Source
10------
12 ++ unit |* a/$-(* *) :: maybe
13 $@($~ {$~ u/a}) ::
16Examples
17--------
19See also: `++bind`
21 ~zod/try=> ? *(unit time)
22 ?({$~ u/@da} $~)
23 ~
25 ~zod/try=> > =a |= a/@
26 ^- (unit @)
27 ?~ a ~
28 [~ a]
29 > (a 2)
30 [~ u=2]
33***