on bfaa358 help sign in
39 lines 579 B history raw
1### `++biff`
3Unit as argument
5Applies a function `b` that produces a unit to the unwrapped value of ++unit
6`a` (`u.a`). If `a` is empty, `~` is produced.
8Accepts
9-------
11`a` is a unit.
13`b` is a function that accepts a noun and produces a unit.
15Produces
16--------
18A unit.
20Source
21------
23 ++ biff :: apply
24 |* {a/(unit) b/$-(* (unit))}
25 ?~ a ~
26 (b u.a)
29Examples
30--------
32 ~zod/try=> (biff (some 5) |=(a/@ (some (add a 2))))
33 [~ u=7]
34 ~zod/try=> (biff ~ |=(a/@ (some (add a 2))))
35 ~
39***