Does Hask form a theoretically valid category? Or it just pretends to be one?

点点圈 提交于 2019-12-24 18:33:58

问题


Hask looks like a subcategory of the SET - category of all sets and single-argument functions between them. However, seems like it fails to preserve id when it comes down to the undefined: seq undefined () fails with exception as it suppose to, however seq (undefined . id) () = seq (id . undefined) () = (). Obviously, id acts wrongly.

Is there a way to (theoretically at least) resolve this issue and make Hask a category indeed? Except throwing undefined away?

来源:https://stackoverflow.com/questions/51331179/does-hask-form-a-theoretically-valid-category-or-it-just-pretends-to-be-one

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!