Sorted.sort.ins.put: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/ez/sorted.bend as Sorted Lines 10-24 of ezx@1.11.0.0/src/ez/sorted.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/ez/sorted.bend&start_line=10&end_line=24 import Base # where one string belongs in a list already sorted, once the rest of that list # has been placed. The recursion is done before the choice, because a def may # not call itself inside a branch. def sort.ins.put( le: Bool, +item: String, head: String, tail: List<&2, String>, rest: List<&2, String> ) -> List<&2, String>: match le: case True{}: item <> (head <> tail) case False{}: head <> rest Uses (3): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String