These are chat archives for ramda/ramda

5th
Feb 2015
Jethro Larson
@jethrolarson
Feb 05 2015 00:09
R.assoc(key, val, obj) is non-mutative
map(assoc('dead', true), people); would add dead: true to the objects in all people
Jethro Larson
@jethrolarson
Feb 05 2015 00:14
well, it wouldn't modify the actual objects, it'd return a new array of new objects extended with the new property
Josh Rehman
@javajosh
Feb 05 2015 00:15
:smile:
Michael Hurley
@buzzdecafe
Feb 05 2015 00:21
useWith is a rtamda coinage, so no one will know what it means
in haskell it would just be compose
Jethro Larson
@jethrolarson
Feb 05 2015 01:09
The farther I go with FP the more I feel I need to learn haskell to follow what people are saying.
Jethro Larson
@jethrolarson
Feb 05 2015 02:32

okay so

R.useWith(R.add, R.multiply(2), R.I)(3, 4)

could be written as

R.compose(R.add, R.multiply(2))(3)(4)

but why doesn't this work:

R.curryN(2, R.compose(R.add, R.multiply(2)))(3, 4)
Jethro Larson
@jethrolarson
Feb 05 2015 02:46
I'm see it's working out like add(multiply (2, 3, 4))
Jethro Larson
@jethrolarson
Feb 05 2015 02:57
I found this interesting
R.foldl(R.call, compose(R.add, R.multiply(2))) ([3, 4])
Jethro Larson
@jethrolarson
Feb 05 2015 07:21
Though it doesn't work with more arguments. not even with curryN. Still trying to wrap my head around that.
David Chambers
@davidchambers
Feb 05 2015 08:04
More name changes to discuss: #775. These should not be controversial, I hope, as it's a matter of choosing one of our three styles. Suffixes have the advantage of ensuring related functions (e.g. R.foldL and R.foldR) appear near one another when listed alphabetically. The question is whether the suffix should be upper- or lower-case. R.partiall looks strange, so I think upper-case is the right choice.
Raine Virta
@raine
Feb 05 2015 12:49
what's the third style?
foldl, foldL, ?
Robin Lambertz
@roblabla
Feb 05 2015 12:50
lowercase prefix
R.pPipe
Raine Virta
@raine
Feb 05 2015 12:50
right
Stefan Bruvik
@stebru
Feb 05 2015 13:33
Hey, is reduce removed permanently?
Oh, it's back in 0.9.2, right?
Jethro Larson
@jethrolarson
Feb 05 2015 17:19
Uppercase. Camelcase is the most prevalent way in js
Jethro Larson
@jethrolarson
Feb 05 2015 20:21
https://medium.com/@cramforce/on-the-awesomeness-of-fn-displayname-9511933a714a
Could this be used to make debugging of curried functions easier?
Michael Hurley
@buzzdecafe
Feb 05 2015 20:54
Reduce will be back real soon
David Chambers
@davidchambers
Feb 05 2015 20:55
:cry:
Michael Hurley
@buzzdecafe
Feb 05 2015 23:10
cheer up @davidchambers 'cuz now it looks like we'll be dropping foldl instead
David Chambers
@davidchambers
Feb 05 2015 23:11
We'll see what Scott thinks about all this once he's feeling better.