let rec map f = function | RowCons (label, hd, tl) -> RowCons (label, f hd, f tl) | RowUniform content -> RowUniform (f content) | App (l, r) -> App (f l, f r) | Var v -> Var (f v)