def split_last

mylsm-lsm-store@0.3.2.0 · src/Manifest.bend:162

import mylsm-lsm-store@0.3.2.0/src/Manifest.bend as Manifest
import Base

162def split_last(ls: List<&2, String>, acc: List<&2, String>) -> (List<&2, String> & String):
163  match ls:
164    case Nil{}:
165      (List.reverse(&2, String, acc), "")
166    case Con{h, Nil{}}:
167      (List.reverse(&2, String, acc), h)
168    case Con{h, Con{k, t}}:
169      split_last(Con{k, t}, Con{h, acc})

Uses (5)

Used by (2)