News for hackers. Stuff that matters.
Re:What Monoids teach us about software by marcosdumay on Wednesday September 13, 2017 @06:42PM (#15243418)
If you are writing Haskell, you document your code this way first¹, and what is missing from this kind of definition you write down with words.

It's incredibly useful, since you can just go into Hoogle or some similar tool and query a function that:

    Monoid m => (a -> m) -> [a] -> m
And it will tell you it's called `foldMap`, and is available by default. Not long ago I have made this exact query because I forgot the name.

1 - Well, the autodoc write those comments for you.

There are no comments on this comment yet.