on 492ae2f help sign in
29 lines 669 B history raw
1# `:scon`, `:_`, "colcab", `{$scon p/twig q/twig}`
3Inverted tuple of `p` `q`.
5Produces: a cell of `[q p]`. Exists for code readability and organization. See the backstep convention.
7Regular form: *2-fixed*
9Examples:
11 ~zod/try=> :_(1 2)
12 [2 1]
14A simple example. `:_` produces the cell of any two twigs, but in
15reverse order.
17 ~zod/try=> `tape`:_(~ 'a')
18 "a"
20Since a `++tape` is a null-terminated list of characters, casting
21the result of `:_(~ 'a')` to a `tape` produces `"a"`.
23 /~zod/try=>
24 :_ (add 2 2)
25 |- (div 4 2)
26 [2 4]
28Most commonly `:_` helps to organize code, allowing you to produce a
29cell from nested computation.