Search code examples
haskellhaskell-lens

Is it possible to nest `at` with setters?


I'd like to set a value in 2 level map - i.e. to a key in a map which is a value for some key in an "outer" map. For ordinary Map I could use something like m & at 42 ?= "value" But I could not find any way to nest 2 at's What is the easiest way to set such nested value using lens?


Solution

  • User trapdoor showed up that there is a nicer solution - http://juick.com/qrilka/2602819#19 and it is right in the lens library : non