Գրեք սա: Efficient Generalized Folds