These are chat archives for ramda/ramda

Jul 2017
Robert Mennell
Jul 29 2017 00:35
ooh that's a pretty cool way to call a transformer on a static piece of data(or data you get before the transformer)!
Jul 29 2017 05:35
Consider this general fn for padding both sides of an array with a fill:
const pad = R.curry((fill, num, arr) =>
  R.converge(R.concat, [R.identity, R.concat(arr)])(R.repeat(fill, num)))

Now consider these 2 derived fns for similarly padding the rows or columns of a rectangular 2d array:

const rowPad = R.curry((fill, num, arr) =>
  pad(R.repeat(fill, arr[0].length), num, arr))

const colPad = R.curry((fill, num, arr) =>, num), arr))

Can they be shortened up? In particular, can we get rid of the points?

Shakeel Shafiq
Jul 29 2017 07:46
Very early to ramda, trying to solve this The compose is returning the property I want. My question is how can I pass the property to select from composed method parseLog
Jul 29 2017 16:33
Hi there how can I flatten a object so that all the nested keys become keys at same level is there any single function to do that??
@thirdknife var propFromLog = key => composeP(R.prop(key), readXMLFile) so you can call it like propFromLog('Project')(logFile)
Bijoy Thomas
Jul 29 2017 17:15
you can also curry the function so that it accepts the key and file arguments together or separately ..
Jul 29 2017 17:34
Jul 29 2017 20:31
const lensProp2 = converge(lens, [prop, assoc]); How come this isn't a valid definition of a lensProp function, it only returns undefined when used with view? There must be something I don't understand about converge?