def sp.fin
import cswap-bend-cli@0.1.0.0/fmt/yamlr.bend as Yamlrimport Base
166def sp.fin(+sp: Sp) -> List<&2, List<&2, Ln>>:
167 match sp:
168 case Sp{done, cur, h}:
169 List.reverse(&2, List<&2, Ln>, Bool.pick(List<&2, List<&2, Ln>>, List.is_empty(&2, Ln, cur), done, List.reverse(&2, Ln, cur) <> done))