[Haskell-cafe] Functional references
lemming at henning-thielemann.de
Fri Sep 5 16:39:52 EDT 2008
On Thu, 4 Sep 2008, Ryan Ingram wrote:
> Nice. I've written similar stuff a couple of times before, but the
> formulation using Maybe and modify definitely solves some problems I
> started to notice as I used it on bigger structures. However, it
> might be better to separate a class of "never failing" references,
> where the reader is guaranteed to succeed, from "potentially failing"
> references which give a Maybe value.
> I'd also not use the names "get" and "modify" because they are already
> used by MonadState. I always used "frGet", "frSet", and "frModify",
> and then tended to not use them directly as I was generally working in
> a state monad.
Haskell already supports qualification, why manual prefixing?
More information about the Haskell-Cafe