Share your code. Components are building blocks, you are the architect.

utils/lens-index
v1.0.0
1.0.0
MIT
PUBLIC
0
Build: none
BuildNone
Returns a lens whose focus is the specified index.

Please configure Bit as a scoped registry to install components with NPM.Learn more

npm config set '@bit:registry' https://node.bitsrc.io
Use utils/lens-index in your project
npm i @bit/bit.ramda.utils.lens-index
Copied

lensIndex (n:Number) : Lens

Returns a lens whose focus is the specified index.

Example

var headLens = R.lensIndex(0);

     R.view(headLens, ['a', 'b', 'c']);            //=> 'a'
     R.set(headLens, 'x', ['a', 'b', 'c']);        //=> ['x', 'b', 'c']
     R.over(headLens, R.toUpper, ['a', 'b', 'c']); //=> ['A', 'b', 'c']

Argument

n: Number

Returns

Lens