Making functions using foldl in PureScript

InstructorVincent Orr

Share this video with your friends

Send Tweet

foldl gives us a lot of flexibility when working with lists and arrays. You can use foldl to create new functions to manipulate data exactly how you need to.

As long as the types match, foldl will accept many functions to apply the specific behavior you need. In this lesson, we’ll look at how to create a map and filter using foldl.

Robert Pearce
~ 6 years ago

I see filter' and reverse' have forall a b, but I don't see b used in the type definition. Was this done on purpose?