|
|
|
|
|
by simondw
704 days ago
|
|
> map, and_then, etc. I think this would be called being "monadic". Strictly speaking, I think providing "map" just makes it functorial. Monadic would need a flatmap. (In addition to the other functor and monad requirements, of course.) |
|
For example, the Option and Result type both have functions like "map", they do the same thing just on different types. They're not quite generic in that sense, but on a high level they seem so.
Another example are reactive libraries. Everything is pegged into some common operations like map, take, and so on.