On Sun, 10 Feb 2008, Luke Palmer wrote: > Quite frequently. > > Here are a few examples from my own code: > > For "functional references" (representing a bidirectional function > from a data type to a part of itself (for example the first element of > a pair)). > > > data Accessor s a > > = Accessor { get :: s -> a > > , set :: a -> s -> s > > } > > My quantum computation arrow (really in the realm of "concrete, useful > things", huh? :-)
The pattern seems to be common enough to be turned into a package. http://www.haskell.org/haskellwiki/?title=Record_access&action=history _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe