on 492ae2f help sign in
41 lines 1.5 kB history raw
1### `++tank`
3Pretty-printing structure.
5A `++tank` is one of three cases: a `%leaf`
6is simply a string; a `%palm` is XX need more information; and a `%rose` is a
7list of `++tank` delimted by the strings in `p`.
10Source
11------
13 ++ tank $% {$leaf p/tape} :: printing formats
14 $: $palm :: backstep list
15 p/{p/tape q/tape r/tape s/tape} ::
16 q/(list tank) ::
17 == ::
18 $: $rose :: flat list
19 p/{p/tape q/tape r/tape} :: mid open close
20 q/(list tank) ::
21 == ::
22 == ::
24Examples
25--------
27 ~zod/try=> >(bex 20) (bex 19)<
28 [%rose p=[p=" " q="[" r="]"] q=~[[%leaf p="1.048.576"] [%leaf p="524.288"]]]
29 ~zod/try=> (wash [0 80] >(bex 20) (bex 19)<) :: at 80 cols
30 <<"[1.048.576 524.288]">>
31 ~zod/try=> (wash [0 15] >(bex 20) (bex 19)<) :: at 15 cols (two lines)
32 <<"[ 1.048.576" " 524.288" "]">>
34 ~zod/try=> [(bex 150) (bex 151)] :: at 80 cols
35 [ 1.427.247.692.705.959.881.058.285.969.449.495.136.382.746.624
36 2.854.495.385.411.919.762.116.571.938.898.990.272.765.493.248
37 ]
41***