6Applies a function `b` that produces a unit to the unwrapped value of ++unit
7`a` (`u.a`). If `a` is empty, `~` is produced.
14`b` is a function that accepts a noun and produces a unit.
25 |* {a/(unit) b/$-(* (unit))}
33 > (biff (some 5) |=(a/@ (some (add a 2))))
35 > (biff ~ |=(a/@ (some (add a 2))))
43Non-unit function to unit, producing unit
45Applies a function `b` to the value (`u.a`) of a ++unit `a`, producing
46a unit. Used when you want a function that does not accept or produce a
47unit to both accept and produce a unit.
73 > (bind ((unit @) [~ 97]) ,@t)
75 > =a |=(a/@ (add a 1))
76 > (bind ((unit @) [~ 2]) a)
86Replaces an empty ++unit `b` with the product of a called trap
87`a`. If the unit is not empty, then the original unit is produced.
99Either the product of `a` or the value inside of unit `b`.
116 > ((bond |.((bex 10))) ~)
118 > ((bond |.((bex 10))) (slaw %ud '123'))
126Group unit values into pair
128Produces `~` if either `a` or `b` are empty. Otherwise, produces a
129++unit whose value is a cell of the values of two input units `a` and
142A unit of the two initial values.
147 ++ both :: all the above
148 |* {a/(unit) b/(unit)}
157 > (both (some 1) (some %b))
166Apply function to two units
168Applies a binary function `c`--which does not usually accept or produce a `++unit`--
169to the values of two units, `a` and `b`, producing a unit.
178`c` is a function that performs a binary operation.
189 |* {a/(unit) b/(unit) c/_|=(^ +<-)}
198 > =u ((unit @t) [~ 'a'])
199 > =v ((unit @t) [~ 'b'])
200 > (clap u v |=([a=@t b=@t] (welp (trip a) (trip b))))
202 > =a ((unit @u) [~ 1])
203 > =b ((unit @u) [~ 2])
204 > =c |=([a=@ b=@] (add a b))
215Makes a ++list of the unwrapped value (`u.a`) of a `++unit` `a`.
239 > =a ((unit @) [~ 97])
251Give unit a default value
253Produces a default value `b` for a `++unit` `a` in cases where `a` is null.
260`b` is a noun that's used as the default value.
265Either a noun `b` or the unwrapped value of unit `a`.
290Accepts a `++gate` `a` and produces a function that accepts `++unit`
291`b` to which it applies `a`. Used when you want a function that does not accept
292or produce a unit to both accept and produce a unit.
309 ++ lift :: lift gate (fmap)
311 |* b/(unit) :: curried
318 > ((lift dec) `(unit @)`~)
320 > ((lift dec) `(unit @)`[~ 20])
330Accepts two units `a` and `b` whose values are expected to be
331equivalent. If either is empty, then the value of the other is produced.
332If neither are empty, it asserts that both values are the same and
333produces that value. If the assertion fails, `++mate` crashes with
334`'mate'` in the stack trace.
352 |* {a/(unit) b/(unit)}
355 ?.(=(u.a u.b) ~|('mate' !!) a)
361 > =a ((unit @) [~ 97])
362 > =b ((unit @) [~ 97])
365 > =a ((unit @) [~ 97])
369 > =a ((unit @) [~ 97])
370 > =b ((unit @) [~ 98])
382Retrieve the value from a `++unit` and crash if the unit is null.
392Either the unwrapped value of `a` (`u.a`), or crash.
406 > =a ((unit [@t @t]) [~ ['a' 'b']])
409 > =a ((unit @ud) [~ 17])
423Takes any atom `a` and produces a [`++unit`]() with the value set to `a`.
438 ++ 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