def file.ins.put
import ezx@1.11.0.0/src/pkg/pkg.bend as Pkgimport Base
553# where a file goes among the files already in order: before the one it is not
554# after, otherwise behind it. The rest of the insertion is a parameter, because
555# two defs that call each other are not allowed.
556def file.ins.put(le: Bool, item: Item, head: Item, tail: List<&2, Item>, rest: List<&2, Item>) -> List<&2, Item>:
557 match le:
558 case True{}:
559 item <> (head <> tail)
560 case False{}:
561 head <> rest