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

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -