6Container arm for queue operation arms. The contained arms inherit its
24Vertically rebalances queue `a`.
42 ?. |(?=($~ l.a) (vor n.a n.l.a))
43 $(a [n.l.a l.l.a $(a [n.a r.l.a r.a])])
44 ?. |(?=($~ r.a) (vor n.a n.r.a))
45 $(a [n.r.a $(a [n.a l.a l.r.a]) r.r.a])
53 > `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~]
54 {"a" "b" "c" "d" "e" "f" "g"}
55 > `*`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~]
56 [[97 0] 0 [98 0] 0 [99 0] 0 [100 0] 0 [101 0] 0 [102 0] 0 [103 0] 0 0]
57 > ~(bal to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~])
58 {"a" "b" "c" "d" "e" "f" "g"}
59 > `*`~(bal to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~])
60 [[100 0] [[99 0] [[98 0] [[97 0] 0 0] 0] 0] [101 0] 0 [102 0] 0 [103 0] 0 0]
62------------------------------------------------------------------------
68Produces the maximum depth of leaves (r.a and l.a) in queue `a`.
83 +- dep :: max depth of queue
86 +((max $(a l.a) $(a r.a)))
93 > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 7 ~])
96 > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 ~])
99 > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 ~])
102 > ~(dep to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~])
104 > ~(dep to ~(bal to `(qeu tape)`["a" ~ "b" ~ "c" ~ "d" ~ "e" ~ "f" ~ "g" ~ ~]))
107------------------------------------------------------------------------
113Push all elements of `++list` `b` into the `++queue`.
130 +- gas :: insert list to queue
131 |= b=(list ,_?>(?=(^ a) n.a))
133 ?~(b a $(b t.b, a (put(+< a) i.b)))
139 > (~(gas to `(qeu ,@)`~) `(list ,@)`[1 2 3 ~])
141 > =a (~(gas to `(qeu ,@)`~) `(list ,@)`[1 2 3 ~])
142 > =b `(list ,@)`[4 5 6 ~]
146------------------------------------------------------------------------
152Produces the head and tail `++queue` of `a`.
162The last element in `a` along with the rest of queue `a`.
167 +- get :: head-tail pair
168 |- ^+ ?>(?=(^ a) [p=n.a q=*(qeu _n.a)])
175 ?: |(?=($~ q.b) (vor n.a n.q.b))
177 [n.q.b [n.a l.a l.q.b] r.q.b]
183 > =s (~(gas to *(qeu @)) `(list @)`~[1 2 3])
189------------------------------------------------------------------------
195Removes the head of `++queue` `a`, producing the resulting queue.
210 +- nap :: removes head
214 bal(a ^+(a [p.b q.b r.a]))
220 > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
231------------------------------------------------------------------------
237Accept any noun `b` and adds to `++queue` `a` as the head, producing the
255 +- put :: insert new tail
267 > (~(gas to `(qeu @)`~) `(list @)`[3 1 2 4 5 6 ~])
271------------------------------------------------------------------------
277Produces `++queue` `a` as a `++list` from front to back.
287 +- tap :: adds list to end
288 |= b/(list _?>(?=(^ a) n.a))
289 =+ z=0 :: XX breaks jet match
293 $(a r.a, b [n.a $(a l.a)])
299 > =a (~(gas to `(qeu @)`~) `(list @)`[3 1 2 4 5 6 ~])
301 [6 0 2 [4 [5 0 0] 0] 1 0 3 0 0]
302 > (~(tap to a) `(list @)`[99 100 101 ~])
303 ~[3 1 2 4 5 6 99 100 101]
305------------------------------------------------------------------------
309Produces the head of `++queue` `a` as a `++unit` (an empty queue has no head).
324 +- top :: produces head
325 |- ^- (unit _?>(?=(^ a) n.a))
327 ?~(r.a [~ n.a] $(a r.a))
332 > =a (~(gas to `(qeu @)`~) `(list @)`[1 2 3 4 5 6 ~])
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