[Haskell-cafe] Quick question on Lens

Daniel Trstenjak daniel.trstenjak at gmail.com
Sun May 4 20:46:05 UTC 2014


Hi Corentin,

On Sun, May 04, 2014 at 10:34:34PM +0200, Corentin Dupont wrote:
> I have a record like this:
> 
> data A = { _bs :: [B]}
> 
> funcA :: State A ()
> funcA = bs ??? funcB
> 
> funcB :: State B ()
> funcB = ...

You might have something like:

funcA :: State A ()
funcA = bs . traversed %= funcB

funcB :: B -> B
funcB = ...


Greetings,
Daniel


More information about the Haskell-Cafe mailing list