def Sp.lclose

bendtorch-load@1.3.0.0 · main.bend:364

import bendtorch-load@1.3.0.0/main.bend as BendtorchLoad
import Base

364# ] closes a list; at depth 3 it is the entry's shape or data_offsets
365def Sp.lclose(is_sh: Bool, is_of: Bool, ps: Ps) -> Ps:
366  match is_sh is_of ps:
367    case True{} _ Ps{d, c, p, n, f, dt, sh, of, ns, rs, bad}: Ps{U32.sub(d, 1), False{}, p, n, f, dt, List.reverse(&2, W64, ns), of, Nil{}, rs, bad}
368    case _ True{} Ps{d, c, p, n, f, dt, sh, of, ns, rs, bad}: Ps{U32.sub(d, 1), False{}, p, n, f, dt, sh, List.reverse(&2, W64, ns), Nil{}, rs, bad}
369    case _ _ Ps{d, c, p, n, f, dt, sh, of, ns, rs, bad}: Ps{U32.sub(d, 1), False{}, p, n, f, dt, sh, of, Nil{}, rs, bad}

Uses (6)

Used by (1)