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
.
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?