These are chat archives for ramda/ramda

Jan 2019
Shea Parkes
Jan 28 02:42

Thanks everyone for the very nice library. The cookbook has helpful examples, but I'm still struggling to see the right way to do some simple things. For example, this really doesn't feel idiomatic:

const lookupTable = {'bob': 10, 'alice': 12, 'eve': 13}
const transaction = {name: 'bob', due: 22}

const curriedLookup = R.converge(,
    R.pipe(R.nthArg(1), R.prop('name')),


Is there a better way to build a function that accepts a lookup table first and then a record to lookup second? Is the idiomatic answer "just mixin an arrow function"? Thanks again.

Jan 28 06:23
kapil1 ```
kapil1 accountIdField.set('value', row.accountId) lastRowPayment.$('amount').set('value', row.amount) lastRowPayment.$('transDate').set('value', row.transDate) lastRowPayment.$('source').set('value', row.source) lastRowPayment.$('memo').set('value', row.memo)
kapil1 how to reduce above functions with one line in ramda?
Johnny Hauser
Jan 28 16:30
Is anyone using eslint with this style currying?
I can't find a config to make that work with indentation
Jan 28 18:03
i wanna use R.evolve with new data
conversation: {
       id: 0,
       messages: friends[0].messages,

const transformations = {
      id: R.identity(position), ///position is coming from outside
      messages: R.identity(friends[position].messages)

const newSchtuff =      R.evolve(
Riku Tiira
Jan 28 18:07
@6ewis R.evolve expects functions but R.identity(val) returns the value, you probably want to use R.always here
Jan 28 18:08
thanks @rikutiira
i cant never read the signature {k: (v → v)} → {k: v} → {k: v} ==> everytime i figure that out i forget 3 months later
first one is i expect a function, then...what?
Riku Tiira
Jan 28 18:14
{k: (v → v)} part tells you that you take an object with key/value transformers, then second argument is an object of key/value pairs and it returns a new object of key/value pairs
and if the type signatures are giving you trouble, the expanded paramters and/or documented functionality are usually more helpful anyway