adamc@826: fun mapX [a] [b] [ctx ::: {Unit}] f =
adamc@801: let
adamc@801: fun mapX' ls1 ls2 =
adamc@801: case (ls1, ls2) of
adamc@801: ([], []) =>
adamc@801: | (x1 :: ls1, x2 :: ls2) => {f x1 x2}{mapX' ls1 ls2}
adamc@801: | _ => error ListPair.mapX: Unequal list lengths
adamc@801: in
adamc@801: mapX'
adamc@801: end