Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
Activity
• Jan 31 2019 22:17
CrossEye commented #2779
• Jan 31 2019 21:04
ArturAralin commented #2779
• Jan 31 2019 20:08
CrossEye commented #2779
• Jan 31 2019 18:56
buzzdecafe commented #2631
• Jan 31 2019 18:09
ArturAralin commented #2779
• Jan 31 2019 16:18
CrossEye commented #2779
• Jan 31 2019 16:10
CrossEye commented #2631
• Jan 31 2019 16:06
CrossEye commented #2777
• Jan 31 2019 14:44
ArturAralin opened #2779
• Jan 31 2019 07:39
inferusvv commented #2631
• Jan 31 2019 03:07
sespinozj commented #2771
• Jan 31 2019 02:33
• Jan 31 2019 02:26
JeffreyChan commented #2777
• Jan 30 2019 14:30
CrossEye closed #2777
• Jan 30 2019 12:13
• Jan 30 2019 01:42
JeffreyChan commented #2777
• Jan 29 2019 21:06
• Jan 29 2019 16:28
CrossEye commented #2777
• Jan 29 2019 15:50
mbostock commented #2772
• Jan 29 2019 15:48
CrossEye commented #2772
Dave Keen
@ccapndave
What about R.pipe(R.identity(), R.lt(2))(1)
It feels like that should return true
But anyway
I understand why it can't
But its still weird :)
Roman Pominov
@rpominov
just wonder, why this works R.identity()()()()()()(1)?
Ludwig Magnusson
@TheLudd
A curried function called with no arguments returns itself
Roman Pominov
@rpominov
ah, makes sense
Denis Stoyanov
@xgrommx
This project looks promising https://github.com/gonzaloruizdevilla/alicates
David Chase
@davidchase
interesting name translates to pliers ?
Denis Stoyanov
@xgrommx
yes)
Dave Keen
@ccapndave
Is there a function like R.nth, but that takes an array of indexes and returns an array of values?
R.multiNth([0, 2])([1, 2, 3, 4, 5]) => [1, 3]
Kevin Wallace
@kedashoe
@ccapndave R.props can help you there
@maintainers maybe an @see from R.nth to R.props would help?
Dave Keen
@ccapndave
Oh, perfect
Yes a @see would be cool
I have just spent about three hours writing a long complicated Ramda algorithm, only to discover that I can do it in 5 lines
argh
Danielle McLean
@00dani
http://ramdajs.com/0.17/docs/#set and http://ramdajs.com/0.17/docs/#over appear to have exactly the same description and probably shouldn't.
David Chambers
@davidchambers
Thanks, @00Davo. This was fixed in ramda/ramda#1337.
Dave Keen
@ccapndave
Is there a R.mapWithIndex or equivalent function somewhere that I am missing?
Currently I am doing some monstrosity with converge and range
Ludwig Magnusson
@TheLudd
check out addIndex
Dave Keen
@ccapndave
Thanks
That's really higher-order
I like it
Ludwig Magnusson
@TheLudd
Genreal question: What do I need to do to control the text in this view on gihub. I.e where it says "See the upgrade guide for a description of the changes"
David Chambers
@davidchambers
GitHub releases are still mysterious to me. @CrossEye knows his way around them.
Simon Friis Vindum
@paldepind
@TheLudd I think it's controlled by git tags. You make a tag to do a release.
Jakub Korzeniowski
@kujon
just wondering - is lens composition possible in Ramda?
Jakub Korzeniowski
@kujon
• just figured out the answer, it is left-to-right for lenses as explained here: ramda/ramda#1288
Ludwig Magnusson
@TheLudd
@paldepind But if you look at the tag messages of ramda, they don't contain that text
Scott Sauyet
@CrossEye
I have simply been editing the tag, including the text and making it as a prerelease. No magic.
Kevin
@kevinwshin
Why does
R.compose(R.map(R.__, [1,2,3]), R.add)(1)
not work? And what is the difference between that and
R.compose(R.map(R.__, [1,2,3]), R.identity)(R.add(1))?
Scott Sauyet
@CrossEye

This would work:

R.compose(R.map(R.__, [1,2,3]))(R.add(1));  //=> [2, 3, 4]

The original is trying to map the binary function add over [1, 2, 3], which doesn't make sense, then assuming the result is a function, and calling it with value 1.

map needs a unary function.
Scott Sauyet
@CrossEye

I'm exaggerating when I say that doesn't make sense. It returns a list of functions, essentially equivalent to [add(1), add(2), add(3)];

R.map(R.flip(R.call)(5), R.map(R.add, [1, 2, 3])); //=> [6, 7, 8]

But I don't think that's the sort of behavior you're looking for.

Kevin
@kevinwshin
I thought compose would give 1 to add, then give add(1) to map. Am I misunderstanding?
Scott Sauyet
@CrossEye
Sorry, I misread. You're right, it should, in my opinion.
I believe we broke compose in v16 or v17. I'm planning on writing up a proposal to reverse that. I was planning on doing it days ago, but life got in the way.
Kevin
@kevinwshin
Oh, good to know. Thanks for taking a look. If it helps, I think pipe is also behaving the same way.
Scott Sauyet
@CrossEye
Yes, it was the same check-in.
We're having lots of discussions right now about compose/pipe, and we need to figure out how to deal with this.
This did work in v15: http://bit.ly/1O0uEki
But it broke in 16.
ramda/ramda#1318 discusses some of the problems.
Matthew Steedman
@knubie
Hi, I'm wondering, is there a variadic version of R.concat?
Matthew Steedman
@knubie
i was attempting to write R.converge(R.concat, fn1, fn2, fn3) but instead had to write R.converge(R.concat, R.converge(R.concat, fn1, fn2), fn3)
Scott Sauyet
@CrossEye
Ramda doesn't have one. You could probably define one as:
var concatAll = R.unapply(R.reduce(R.concat, []));