3 ms·Yes, higher order functions (especially foldr (resp. reduce)) are the way to go.by eru 16y agoYes, higher order functions (especially foldr (resp. reduce)) are the way to go.