let rec fold f term accu = match term with | RowCons (_, hd, tl) -> f hd (f tl accu) | RowUniform content -> f content accu | App (l, r) -> f r (f l accu) | Var v -> f v accu