Generalize curry.