Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Although I don't disagree regarding the difficulty of understanding Cofree, at least the blog post explains what it's doing in this context. That alone was enough for me to understand that beginning snippet, convince me that there was at least some utility in the use of Cofree here, and remember this as an example of where it can be useful.

The parent^2 comment also snipped an example explained in the blog post, where he specifically chose that structure so that he could make use of built-in structures to traverse the tree. Similar to the use of Cofree (though I understand the Traversable monad far more), the reasoning was presented, it made sense, and I could move on from that without scratching my head.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: