since import { At , Lens } from '..' ; import { Option , isNone } from 'fp-ts/lib/Option' ; import * as R from 'fp-ts/lib/Record' ; category since export function atRecord < A = never > ( ) { return new At ( ( k ) => new Lens ( ( r ) => R . lookup ( k , r ) , ( oa ) => ( r ) => { if ( isNone ( oa ) ) { return R . deleteAt ( k ) ( r ) ; } else { return R . insertAt ( k , oa . value ) ( r ) ; } } ) ) ; }