getify / Functional-Light-JS

Pragmatic, balanced FP in JavaScript. @FLJSBook on twitter.
http://FLJSBook.com
Other
16.6k stars 1.96k forks source link

fix stock id in 'randomStockUpdate' #159

Open ItaHeld90 opened 6 years ago

ItaHeld90 commented 6 years ago

stockId was mistakenly written as stockIdx

getify commented 6 years ago

The one-letter typo is indeed a mistake, but I don't understand why you're making the other changes?

ItaHeld90 commented 6 years ago

I figured it would be less error prone and more expressive to make the generated random id into a variable ( instead of repeating 'stockIds[stockIdx]' through the function ). not too critical, especially considering the code is for demonstration purposes. If you prefer, I'll reduce the PR to fix only the typo.

ItaHeld90 commented 6 years ago

I know it's probably not the right forum for this, but anyway... I really enjoyed your book, it really made me boost up my code structure and way of thinking. Just wanted to thank you for all the hard work and contribution for the community :)

getify commented 6 years ago

For now I prefer to only fix typos, not make substantive changes. I would defer those changes for a second edition.

A reduced PR for this typo (with potentially a separate issur/PR for the other suggestions) would be appreciated. Thanks!

ItaHeld90 commented 6 years ago

Opened a new PR #160 with just the typo fix.

I'm not sure what to do with this PR, I guess you can close it, or leave it for future reference/suggestion as you offered. Thanks again :)