import { Index , List } from '../types' ; import { Lens , lens } from '@typed/lenses' ; import { update } from '../update' ; name export function lensIndex < A > ( index ) { return lens ( ( array ) : A => array [ index ] , ( value , list ) => update ( index , value , list ) ) ; }