foldr + curry
don't understand