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
11.02k stars 597 forks source link

Desugar scala code snippet 23 in chapter 3.4 as per issue #296 #297

Closed amacmillanparks closed 1 year ago

amacmillanparks commented 2 years ago

As per issue #296, the Scala edition snippets 22 and 23 are identical when snippet 23 should be a desugared version of snippet 22. This PR fixes that.

drupol commented 2 years ago

Hi,

Thanks for contributing!

This issue seems legit to me, but as I don't have much knowledge in Scala, I'll wait to have more feedback from any other contributor that can help in here.

amacmillanparks commented 2 years ago

Thanks @drupol! Some colleagues and I have been reading through the book and just noticed this in the last chapter we read.

The change should be pretty self explanatory, but happy to discuss more if it'd help.

drupol commented 2 years ago

Hi,

Thanks ! Ok then it's fine for me.

@hmemcpy Ok for you as well ?

drupol commented 1 year ago

@hmemcpy ^^

hmemcpy commented 1 year ago

Oh wow, sorry for missing this. It looks fine, though I'd prefer to use the more idiomatic .flatMap style (with the dot, instead of infix).

Either way this should be fine.

drupol commented 1 year ago

@amacmillanparks Are you planning to implement the changes requested by @hmemcpy ?

amacmillanparks commented 1 year ago

Hi @drupol & @hmemcpy, sorry, I've just seen this now. Thanks for the feedback, I'll go ahead and make the change.

amacmillanparks commented 1 year ago

That's all done now, please can you re-review?

drupol commented 1 year ago

The CI has spoken but I'll wait for @hmemcpy to review this !

hmemcpy commented 1 year ago

Sorry, one more comment: since we're using the native flatMap method (and not the bind syntax >>=), the import bindSyntax._ line can also be removed.

amacmillanparks commented 1 year ago

No worries, that's all done now.

hmemcpy commented 1 year ago

Fantastic, thanks very much for your contribution! And sorry it took a while ;)