logoalt Hacker News

mrkeentoday at 11:34 AM0 repliesview on HN

TIL about Monofunctor.

Pretty nifty. It's for cases where your type is a container of something (as opposed to anything).

I.E. you can .map (or .Select if you're .NET-inclined) over the Chars in a String, but not some other type, because String can't hold another type.

https://hackage.haskell.org/package/mono-traversable-1.0.21....