Generalize fold. Implicitize some parameters