Use of Haskell state monad a code smell?

前端 未结 8 2095
悲哀的现实
悲哀的现实 2020-12-22 19:56

God I hate the term \"code smell\", but I can\'t think of anything more accurate.

I\'m designing a high-level language & compiler to Whitespace in my spare time

8条回答
  •  臣服心动
    2020-12-22 20:41

    It's possible that you may want an applicative functor instead of a monad:

    http://www.haskell.org/haskellwiki/Applicative_functor

    I think the original paper explains it better than the wiki, however:

    http://www.soi.city.ac.uk/~ross/papers/Applicative.html

提交回复
热议问题