These are chat archives for ramda/ramda
I'm trying to learn lenses, but am having trouble composing them.
For example, if I want to partition by a specific prop being over 0, I try:
const splitByNegative = R.partition(R.gte(R.view(R.lensProp('someValue'), 0)) it doesn't split like I expect. Where am I going wrong?
gteis a function where it should be a number
propSatisfies, and the other would be using composition to sort out
gte's arguments. But as I reversed the order of these I used
const x = R.partition( R.propSatisfies(R.lte(0), 'someValue') ) const y = R.partition( R.compose(R.lte(0), R.view(R.lensProp('someValue'))) )
__function instead but I don't like it as much.. ala
R.__before posting, and ended up with
fn is not a function
const splitByNegative = R.partition(R.gte(R.view(someLens, R.__), 0)))
const z = lens => partition(compose(lte(0), view(lens)))
gtewith a function and then a number