These are chat archives for ramda/ramda

13th
Apr 2015
Scott Sauyet
@CrossEye
Apr 13 2015 00:11
@joneshf I don't know how much you've dealt with JS promises. They're something like Future functors, but with an odd twist: the fmap function (called then) accepts two functions, one for the result if the process succeeds, one for the error if the process fails. Passing person to each of these functions is easy enough, but the result of fetchEmail is a Promise (via the well-known Q library. ) Comfortably passing a successful result of that along with person into merge is the main issue.
lluft
@lluft
Apr 13 2015 05:46
@CrossEye. No problem what so ever! Could have worked :) I'm going to try refactoring it using RxJs instead of promises and see if that makes life easier. @joneshf couldn't have said it better than crossEye: the main issue is comfortably passing a success result from the promise along with the person into merge
Ludwig Magnusson
@TheLudd
Apr 13 2015 09:24
converge. Never seen it before. Wish I had. Seems very useful
Scott Sauyet
@CrossEye
Apr 13 2015 11:21
@TheLudd: converge and useWith are both a bit odd, but they are both quite useful.
Ludwig Magnusson
@TheLudd
Apr 13 2015 11:23
Is converge not a standard thing in the FP world?
Scott Sauyet
@CrossEye
Apr 13 2015 11:40
converge is something we did see elsewhere as fork, but I don't know if it's common. Especially combined with nthArg, it allows us to do a little more points-free than we might otherwise be able to do.