def sequence_text
import bend-visgraph@2.0.0.0/src/report.bend as Reportimport Base
41# The degree sequence, one per line. `r` is the degree array with the
42# degree of node `i`; the `f` nodes below `i` are still to print.
43def sequence_text(f: Nat, r: Array<U32> & U32, +i: U32, acc: String) -> String:
44 match f:
45 case 0n:
46 (d, v) = r
47 U32.show(v) ++ "\n" ++ acc
48 case 1n+q:
49 (d, v) = r
50 sequence_text(q, Array.get(U32, d, (i - 1 : U32)), (i - 1 : U32), U32.show(v) ++ "\n" ++ acc)