Getter on Object:
1. prop:
R.prop('x', {x: 100}); //=> 100R.prop('x', {}); //=> undefined
2. props:
R.props(['x', 'y'], {x: 1, y: 2}); //=> [1, 2]R.props(['c', 'a', 'b'], {b: 2, a: 1}); //=> [undefined, 1, 2]
Setter ob Object:
R.assoc('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3}
Another way to use Lens:
var xLens = R.lens(R.prop('x'), R.assoc('x'));R.view(xLens, {x: 1, y: 2}); //=> 1R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2}