List Functor and Monad
List is one of the most fundamental Functors and Monads. It is a container for handling multiple values, enabling function application and chained computations via map and flatMap (also called bind).
- Functor: You can apply a function to each element of a List (
map). - Monad: You can chain computations by flattening multiple Lists (
flatMap).
A List can be seen as an ordered version of a Set, reflecting the concept of a collection with order.