Why does Maybe include Just?

前端 未结 4 1558
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-07 17:42

Thanks to some excellent answers here, I generally understand (clearly in a limited way) the purpose of Haskell\'s Maybe and that its definition is



        
4条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-07 18:28

    Just is a constructor, a alone would be of type a, when Just a constructs a different type Maybe a.

提交回复
热议问题