3 title/'2n: Functional Hacks'
14Build `f` such that `(f x) .= (b (a x))`.
25 ++ cork |*([a=_|=(* **) b=gate] (corl b a))
31 > (:(cork dec dec dec) 20)
34 > =mal (mo (limo a+15 b+23 ~))
35 > ((cork ~(got by mal) dec) %a)
38 > ((cork ~(got by mal) dec) %b)
59 |* [a=gate b=_|=(* **)]
60 =< +:|.((a (b))) :: span check
68 > ((corl (lift bex) (slat %ud)) '2')
77Right-curry a gate, binding the tail of its sample
101 > =tep (cury scan sym)
114Curry a gate, binding the head of its sample
151Demands that a specific type be produced, crashing the program if it is
168 > ((hard (list)) (limo [1 2 3 ~]))
170 > ((hard @) (add 2 2))
172 > ((hard @t) (crip "Tape to cord, bro!"))
174 > ((hard tape) (crip "...Tape to cord, bro?..."))
185Politely requests a specific type to be produced, producing null if it
193 |= fud=* ^- (unit han)
195 ?.(=(gol fud) ~ [~ gol])
201 > ((soft %4) (add 2 2))
204 > ((soft @) (add 2 2))
207 > ((soft %5) (add 2 2))
210 > ((soft @t) (crip "Tape to cord, Woohoo!"))
211 [~ 'Tape to cord, Woohoo!']
213 > ((soft @t) (trip 'Cmon man... Tape to cord? Please?!'))
223Produces the head of a cell.
257Produces the same value that it was given.
291Produces a stack trace if the stack trace isn't null, then produces the other
308 ?~(a same ~>(%slog.[pri i.a] $(a t.a)))
314 > =+ result=((slog [%leaf "error-message"]~) [12 13]) [%product result]
320`slog` is intended to be put in the middle of a bunch of chained function
321calls that string a piece of data through them, so that an error message will be
322printed if there's one to print.
329Ends the program and produces a `tang` tracing error message.
352 > ~>(%mean.[%leaf "fuse-loop"] !!)
362Produces the tail of a cell.
396Checks if `a` and `b` are equal, producing a flag.
411 ++ test |=(^ =(+<- +<+))
423 > (test "hello" 'hello')
426 > (test "hello" ['h' 'e' 'l' 'l' 'o' ~])
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