[Haskell-cafe] about Haskell code written to be "too smart"

Yitzchak Gale gale at sefer.org
Tue Mar 24 17:34:25 EDT 2009

Miguel Mitrofanov wrote:
>>> takeList = evalState . mapM (State . splitAt)

I wrote:
>> However, ironically, I stopped using them for pretty
>> much the same reason that Manlio is saying.

Dan Piponi wrote:
> Are you saying there's a problem with this implementation? It's the
> only one I could just read immediately...
> It says exactly what it means, almost in English.

Yes, I agree. But at a time when the majority
of experienced Haskellers couldn't easily see that because
they weren't comfortable enough with the State monad,
using it would have cost more on average (for debugging,
refactoring, etc.). Whereas now I don't think that's a
problem anymore.


More information about the Haskell-Cafe mailing list