getify / Functional-Light-JS

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

Tech Edit: CH11 #80

Closed DrBoolean closed 7 years ago

DrBoolean commented 7 years ago

It's really cool to see a "real world" example of functional-lite in action. I think it's a great addition to the book.

At first, it was quite hard for me to understand, but I pulled the code, ran it, refactored around to get a better handle on it, and now I totally get it.

Mine's not to say what's idiomatic or correct since this is a pioneered paradigm; all I can offer is assistance with technical flaws, of which there are none, and maybe some comparisons to other fp flavors.

Compared to some other FP flavors:

var formatSign = R.ifElse(R.gt(0), R.concat('+'), R.identity)
var formatCurrency = R.concat('$')
var transformObservable = R.map