on d452c09 help sign in
40 lines 589 B history raw
1### `++both`
3Group unit values into pair
5Produces `~` if either `a` or `b` are empty. Otherwise, produces a
6++unit whose value is a cell of the values of two input units `a` and
7`b`.
9Accepts
10-------
12`a` is a unit.
14`b` is a unit.
16Produces
17--------
19A unit of the two initial values.
21Source
22------
24 ++ both :: all the above
25 |* {a/(unit) b/(unit)}
26 ?~ a ~
27 ?~ b ~
28 [~ u=[u.a u.b]]
31Examples
32--------
34 ~zod/try=> (both (some 1) (some %b))
35 [~ u=[1 %b]]
36 ~zod/try=> (both ~ (some %b))
37 ~
40***