import { curry } from '@typed/lambda' ; /** Create an updated ReadonlyMap by mutating a copy of the initial map */ export const withMutations = curry ( __withMutations ) ; function __withMutations < A , B > ( fn , map ) { const newMap = new Map ( map ) ; fn ( newMap ) ; return newMap ; }