11Applies a function `b` that produces a unit to the unwrapped value of ++unit
12`a` (`u.a`). If `a` is empty, `~` is produced.
19`b` is a function that accepts a noun and produces a unit.
30 |* {a/(unit) b/$-(* (unit))}
38 > (biff (some 5) |=(a/@ (some (add a 2))))
40 > (biff ~ |=(a/@ (some (add a 2))))
48Non-unit function to unit, producing unit
50Applies a function `b` to the value (`u.a`) of a ++unit `a`, producing
51a unit. Used when you want a function that does not accept or produce a
52unit to both accept and produce a unit.
78 > (bind ((unit @) [~ 97]) ,@t)
80 > =a |=(a/@ (add a 1))
81 > (bind ((unit @) [~ 2]) a)
91Replaces an empty ++unit `b` with the product of a called trap
92`a`. If the unit is not empty, then the original unit is produced.
104Either the product of `a` or the value inside of unit `b`.
121 > ((bond |.((bex 10))) ~)
123 > ((bond |.((bex 10))) (slaw %ud '123'))
131Group unit values into pair
133Produces `~` if either `a` or `b` are empty. Otherwise, produces a
134++unit whose value is a cell of the values of two input units `a` and
147A unit of the two initial values.
152 ++ both :: all the above
153 |* {a/(unit) b/(unit)}
162 > (both (some 1) (some %b))
171Apply function to two units
173Applies a binary function `c`--which does not usually accept or produce a `++unit`--
174to the values of two units, `a` and `b`, producing a unit.
183`c` is a function that performs a binary operation.
194 |* {a/(unit) b/(unit) c/_|=(^ +<-)}
203 > =u ((unit @t) [~ 'a'])
204 > =v ((unit @t) [~ 'b'])
205 > (clap u v |=([a=@t b=@t] (welp (trip a) (trip b))))
207 > =a ((unit @u) [~ 1])
208 > =b ((unit @u) [~ 2])
209 > =c |=([a=@ b=@] (add a b))
220Makes a ++list of the unwrapped value (`u.a`) of a `++unit` `a`.
244 > =a ((unit @) [~ 97])
256Give unit a default value
258Produces a default value `b` for a `++unit` `a` in cases where `a` is null.
265`b` is a noun that's used as the default value.
270Either a noun `b` or the unwrapped value of unit `a`.
295Accepts a `++gate` `a` and produces a function that accepts `++unit`
296`b` to which it applies `a`. Used when you want a function that does not accept
297or produce a unit to both accept and produce a unit.
314 ++ lift :: lift gate (fmap)
316 |* b/(unit) :: curried
323 > ((lift dec) `(unit @)`~)
325 > ((lift dec) `(unit @)`[~ 20])
335Accepts two units `a` and `b` whose values are expected to be
336equivalent. If either is empty, then the value of the other is produced.
337If neither are empty, it asserts that both values are the same and
338produces that value. If the assertion fails, `++mate` crashes with
339`'mate'` in the stack trace.
357 |* {a/(unit) b/(unit)}
360 ?.(=(u.a u.b) ~|('mate' !!) a)
366 > =a ((unit @) [~ 97])
367 > =b ((unit @) [~ 97])
370 > =a ((unit @) [~ 97])
374 > =a ((unit @) [~ 97])
375 > =b ((unit @) [~ 98])
387Retrieve the value from a `++unit` and crash if the unit is null.
397Either the unwrapped value of `a` (`u.a`), or crash.
411 > =a ((unit [@t @t]) [~ ['a' 'b']])
414 > =a ((unit @ud) [~ 17])
428Takes any atom `a` and produces a [`++unit`]() with the value set to `a`.
443 ++ some :: lift (pure)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list