# The Universal Properties of Map, Fold, and Filter

DevFeed: [The Universal Properties of Map, Fold, and Filter](<https://devfeed.tech/articles/the-universal-properties-of-map-fold-and-filter-40331.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2013/09/30/the-universal-properties-of-map-fold-and-filter/>)

Published: 2013-09-30T09:00:53Z

Content type: article

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Functional programming](<https://devfeed.tech/topics/functional-programming.md>), [Category Theory](<https://devfeed.tech/topics/category-theory.md>), [functions](<https://devfeed.tech/topics/functions.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [categories](<https://devfeed.tech/tags/categories.md>), [category-theory](<https://devfeed.tech/tags/category-theory.md>), [foldr](<https://devfeed.tech/tags/foldr.md>), [free-object](<https://devfeed.tech/tags/free-object.md>), [functional-programming](<https://devfeed.tech/tags/functional-programming.md>), [functions](<https://devfeed.tech/tags/functions.md>), [list](<https://devfeed.tech/tags/list.md>), [monoids](<https://devfeed.tech/tags/monoids.md>), [programming](<https://devfeed.tech/tags/programming.md>), [standard-ml](<https://devfeed.tech/tags/standard-ml.md>), [universal-properties](<https://devfeed.tech/tags/universal-properties.md>)

## AI overview

This article gives category-theoretic characterizations of the functional programming functions map, fold, and filter. It argues that fold has the strongest universal characterization among the three and introduces a generalization related to transformations of standard compound data types.

## Source excerpt

A lot of people who like functional programming often give the reason that the functional style is simply more elegant than the imperative style. When compelled or inspired to explain (as I did in my old post, How I Learned to Love Functional Programming), they often point to the three "higher-order" functions map, fold, and filter, as providing a unifying framework for writing and reasoning about programs. But how unifying are they, really?