What's the next step to learning Haskell after monads?

前端 未结 9 1757
滥情空心
滥情空心 2021-01-29 18:02

I\'ve been gradually learning Haskell, and even feel like I\'ve got a hang of monads. However, there\'s still a lot of more exotic stuff that I barely understand, like Arrows, A

9条回答
  •  梦谈多话
    2021-01-29 18:20

    As a single next step (rather than half a dozen "next steps"), I suggest that you learn to write your own type classes. Here are a couple of simple problems to get you started:

    • Writing some interesting instance declarations for QuickCheck. Say for example that you want to generate random trees that are in some way "interesting".

    • Move on to the following little problem: define functions /\, \/, and complement ("and", "or", & "not") that can be applied not just to Booleans but to predicates of arbitrary arity. (If you look carefully, you can find the answer to this one on SO.)

提交回复
热议问题