These are chat archives for ramda/ramda

Apr 2015
Raine Virta
Apr 28 2015 10:58
i have more of a design related question. let's say you have a function that queries a db collection and returns a Promise. what's the best way provide that function a reference of the db connectoin or collection? i currently have to define the function in context where the collection is defined outside the scope
i've seen Reader being used for something like this, not sure if i want to go there though
Raine Virta
Apr 28 2015 11:06
perhaps one approach would be to make the collection / db value a Promise as well and then chain over that. that could be nice with some do style notation
Jed Schneider
Apr 28 2015 14:17
so Ramda doesn't have a native function like _.chunk so I assume there is a nice way to build from other functions, but my first couple attempts failed me. ideas?
Stefano Vozza
Apr 28 2015 14:37
In the works: ramda/ramda#1050
Michael Hurley
Apr 28 2015 15:02
This message was deleted
Hardy Jones
Apr 28 2015 16:23
@CrossEye hey, i found this general function it's used to define all of the union, intersection, and difference functions.
I'm not suggesting a verbatim copy, but that's the general idea I was getting at the other day
Scott Sauyet
Apr 28 2015 16:54
@joneshf well I've gotten as far as understanding the signature. :smile:
Hardy Jones
Apr 28 2015 16:58
heh, yeah it's not straight forward what's happening, I think the docs describe it fairly well
in particular, the part "When calling mergeWithKey combine only1 only2..."
Scott Sauyet
Apr 28 2015 17:06
More a matter of lack of time right now.... I'll try to look at it this evening.
@raine I think Reader is the correct abstraction. I really don't know if the ramda-fantasy version is complete, though.