Further simplify the type algebra code, using the newly introduced combinators (map/fold/iter) over types.