Duncan Coutts wrote:
modify :: k -> Map k e -> (e, Maybe e -> Map k e)

so it's a lookup that returns the element at k and also a continuation
that lets you rebuild a new map with an altered element. I guess that
doesn't account for the element not existing. There's probably a
generalisation that does.

isn't it just adding the necessary Maybe?:
modify :: k -> Map k e -> (Maybe e, Maybe e -> Map k e)
?

-Isaac
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to