def lex_pairs
import qasim-bend-kit@0.1.0.2/libs/JSON.bend as JSONimport Base
1081def lex_pairs(trees: List<&2, LexTree>) -> List<&2, LexTree>:
1082 match trees:
1083 case Nil{}: Nil{}
1084 case h <> Nil{}: h <> Nil{}
1085 case a <> b <> t: LexBranch{a, b} <> lex_pairs(t)