These are chat archives for ramda/ramda

Oct 2017
Robert Mennell
Oct 23 2017 20:51
@jonahx considering your propensity to using Ramda, have you looked at pug? You can use Ramda and JS functions to fetch/massage data and send it to properly scope or bound pug template to render to a file in a script. Then just have it call that script. pug can render HTML to a static file, on request, and so forth. It also is a pretty cool library in and of itself for templating
Oct 23 2017 20:55
@skatcat31 thanks for the rec. i’ve never found templating to be a pain point, though. eg, when i used ruby i tried haml and slim, but ended up going back to erb for simplicity. it’s weird, because i care about code looks a lot, but there is some inflection point where additional abstraction isn’t worth the gain for me.
Robert Mennell
Oct 23 2017 20:56
then pug may be good in both cases
Oct 23 2017 23:39

hey guys, I'm trying to write following code in pointfree style, but keep failing. Could someone help me? What I would love to achieve is to get rid of arrow function from 'createFilter'. I was trying some combination of useWith and nthArg, but didn't make it.

const relations_test = [
  {prop1: 'prop1_some_value', prop2: 'prop2_some_value'}, 
  {prop1: 'prop1_some_other_value', prop2: 'prop2_some_value'},

const createFilter = (arg1, arg2) => filter(allPass([
  propEq('prop1', arg1), 
  propEq('prop2', arg2)

const myCustomFilter = createFilter('prop1_some_value', 'prop2_some_value');


//expected result: [{"prop1": "prop1_some_value", "prop2": "prop2_some_value"}]

in repl: