funjs / book-source

The example source code for the book Functional JavaScript by Michael Fogus, published by O'Reilly
Other
349 stars 101 forks source link

Example on 'To Curry Right, or To Curry Left' is harder to understand #9

Open DinisCruz opened 9 years ago

DinisCruz commented 9 years ago

Hi, on page 94 you explain the right vs left currying techniques, but in the example you provide there isn't much 'right or left' action going on. That only happens later on, specially with the blueGreenish example on page 99.

My understanding is that on page 94 the difference actually happening inside the div function, and the order of the parameters is not that relevant (from a curry point of view), where on the blueGreenish you can really see the currying from the rightmost argument.

I think the 'To Curry Right, or To Curry Left' section would be easier to understand on first read if the 'HTML Hexadecimal values with specific hues' example was used instead