hmemcpy / milewski-ctfp-pdf

Bartosz Milewski's 'Category Theory for Programmers' unofficial PDF and LaTeX source
https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/
Other
10.88k stars 578 forks source link

fix to the coend definition #221

Open winitzki opened 4 years ago

winitzki commented 4 years ago

I think the previous code for Coend was incorrect. The previous code was in no way different from the code for trait PolyFunction1, i.e. for End. The Coend must contain an existential quantifier. An existential quantifier is encoded in Scala as a case class with an extra type parameter. An universal quantifier is encoded as a trait with a method having a type parameter.

drupol commented 1 year ago

Hi!

I'm making a small PR cleanup.

What's the status of this PR ?

winitzki commented 1 year ago

I believe this PR fixes an error in the code. It should be reviewed and merged if accepted.