def dir.insert

ezsys@0.1.0.0 · src/dir.bend:27

import ezsys@0.1.0.0/src/dir.bend as Dir
import Base

27# a name put into a sorted list, before the first name it does not sort after
28def dir.insert(+name: String, xs: List<&2, String>) -> List<&2, String>:
29  match xs:
30    case Nil{}:
31      [name]
32    case Con{+next, +ys}:
33      dir.insert.pick(String.is_le(name, next), name, next, ys,
34        _u => dir.insert(name, ys))

Uses (4)

Used by (1)