Module Set

Hal Daume III hdaume@ISI.EDU
Sat, 27 Jul 2002 14:55:53 -0700 (PDT)

As long as we're on the "retrofit FiniteMap" discussion, in addition to
splitting, etc, it would be really nice to have:

  composeFM :: Ord a, Ord b => FiniteMap a b -> FiniteMap b c
                            -> FiniteMap a c

defined in the obvious way.

Also, something like:

  modifyFM :: Ord a => FiniteMap a b -> a -> (b -> b) -> FiniteMap ab

where the function is applied to element a in the fm if it exists.

 - Hal

Hal Daume III

 "Computer science is no more about computers    |
  than astronomy is about telescopes." -Dijkstra |

On Sat, 27 Jul 2002, Christian Maeder wrote:

> > Besides the minimum, also the maximum or the simultaneous splitting of a
> > set into its minimum and the remaining set would be useful (for
> > recursions).
> There's a lot more missing: Test for disjointness, subset-relation as
> well as instances for Show and Ord (lexical order, not subset-relation).
> Also FiniteMap should have these instances (also for Eq), if the
> elements have. These instances would allow nested sets and maps.
> Are the sets supposed to be finite, too? (more documentation would help)
> Christian
> _______________________________________________
> Glasgow-haskell-users mailing list