javascript - Ramda - filtering array of objects - curried fn parameters order -
i want implement filtering function generator in ramda.js. in mind, should works way:
var = filterfn(arrofobjects) var b = a(keyname) var c = b(value)
it's imporant achieve order of arguments, because same array filtered using different conditions.
currently have following code:
var g = r.curryn(2, r.compose(r.filter(r.__)(r.__), r.propeq)) g('classid')(2)(input)
but want have 'input' first argument:
g(input)('classid')(1)
here ramda repl: code
thanks in advance!
i use this:
r.curry((list, name, value) => r.filter(r.propeq(name, value), list));
ramda not include arbitrary parameter-reordering mechanism, flip
, __
placeholder.
Comments
Post a Comment