effect-tree
    Preparing search index...

    Variable decodeConst

    decode: <A>(ta: TreeArray<A>) => Tree<A> = ...

    Decode nested arrays into a tree.

    import {Codec, drawTree} from 'effect-tree'

    const tree = Codec.Arrays.decode([
    1, [
    2, [3, 4, 5],
    [6, [
    7,
    8,
    [11, [9]],
    ]],
    10,
    ],
    ])

    console.log(drawTree(tree).join('\n'))
    // prints:
    // ┬1
    // ├┬2
    // │├─3
    // │├─4
    // │└─5
    // ├┬6
    // │├─7
    // │├─8
    // │└┬11
    // │ └─9
    // └─10

    Type Declaration