Add generic fold