15Applies a function `b` that produces a unit to the unwrapped value of ++unit
16`a` (`u.a`). If `a` is empty, `~` is produced.
22`b` is a function that accepts a noun and produces a unit.
32 |* [a](unit) b]$-(* (unit))]
40 > (biff (some 5) |=(a]@ (some (add a 2))))
43 > (biff ~ |=(a]@ (some (add a 2))))
51Non-unit function to unit, producing unit
53Applies a function `b` to the value (`u.a`) of a ++unit `a`, producing
54a unit. Used when you want a function that does not accept or produce a
55unit to both accept and produce a unit.
80 > (bind ((unit @) [~ 97]) ,@t)
83 > =a |=(a]@ (add a 1))
84 > (bind ((unit @) [~ 2]) a)
94Replaces an empty ++unit `b` with the product of a called trap
95`a`. If the unit is not empty, then the original unit is produced.
105Either the product of `a` or the value inside of unit `b`.
122 > ((bond |.((bex 10))) ~)
125 > ((bond |.((bex 10))) (slaw %ud '123'))
133Group unit values into pair
135Produces `~` if either `a` or `b` are empty. Otherwise, produces a
136++unit whose value is a cell of the values of two input units `a` and
147A unit of the two initial values.
153 |* [a=(unit) b=(unit)]
162 > (both (some 1) (some %b))
172Apply function to two units
174Applies a binary function `c`--which does not usually accept or produce a
175`++unit`-- to the values of two units, `a` and `b`, producing a unit.
183`c` is a function that performs a binary operation.
193 |* [a](unit) b=(unit) c=_|=(^ +<-)]
202 > =u ((unit @t) [~ 'a'])
203 > =v ((unit @t) [~ 'b'])
204 > (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))
221Makes a ++list of the unwrapped value (`u.a`) of a `++unit` `a`.
243 > =a ((unit @) [~ 97])
256Give unit a default value
258Produces a default value `b` for a `++unit` `a` in cases where `a` is null.
264`b` is a noun that's used as the default value.
268Either a noun `b` or the unwrapped value of unit `a`.
292Accepts a `++gate` `a` and produces a function that accepts `++unit`
293`b` to which it applies `a`. Used when you want a function that does not accept
294or produce a unit to both accept and produce a unit.
309 ++ lift :: lift gate (fmap)
311 |* b=(unit) :: curried
318 > ((lift dec) `(unit @)`~)
321 > ((lift dec) `(unit @)`[~ 20])
331Accepts two units `a` and `b` whose values are expected to be
332equivalent. If either is empty, then the value of the other is produced.
333If neither are empty, it asserts that both values are the same and
334produces that value. If the assertion fails, `++mate` crashes with
335`'mate'` in the stack trace.
351 |* [a=(unit) b=(unit)]
354 ?.(=(u.a u.b) ~|('mate' !!) a)
360 > =a ((unit @) [~ 97])
361 > =b ((unit @) [~ 97])
365 > =a ((unit @) [~ 97])
370 > =a ((unit @) [~ 97])
371 > =b ((unit @) [~ 98])
383Retrieve the value from a `++unit` and crash if the unit is null.
391Either the unwrapped value of `a` (`u.a`), or crash.
405 > =a ((unit [@t @t]) [~ ['a' 'b']])
409 > =a ((unit @ud) [~ 17])
424Takes any atom `a` and produces a `++unit` with the value set to `a`.
437 ++ 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