O'Reilly logo

Haskell Cookbook by Yogesh Sajanikar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating maps and filters

In this recipe, we will continue working with recursive functions. In addition to recursion, we will introduce higher order functions. Higher order functions are functions that take other functions as an argument. Higher order functions introduce a layer of abstraction over other functions. If you see a certain pattern repeated over and over again, then you might have hit a situation that can be abstracted as a higher order function.

Though provided by default by Haskell's Prelude module, we will write our own version of two important higher order functions, map and filter

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required