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.84k stars 572 forks source link

Scala Snippet 23 in Chapter 3.4 is Not Desugared #296

Closed amacmillanparks closed 1 year ago

amacmillanparks commented 1 year ago

In Section 3.4's explanation of do notation, the Haskell examples show the use of do notation (snippet 22) and the binds and return that this desugars to (snippet 23).

In the Scala edition these snippets are identical. Snippet 23 should be the desugared version of snippet 22.