Re: [Haskell-cafe] [Haskell] ANNOUNCE: mm2: The library that can be used for optimization of multiple (Ord a) => a -> b transformations

On Sat, 21 Sep 2019, olexandr543--- via Haskell wrote:
My library that can help to optimize using 'case ... of ...' construction if there are multiple (more than at least 5) variants. mm2: The library that can be used for optimization of multiple (Ord a) => a -> b transformations
Isn't this a problem you would solve using Data.Map?

No, because Data.Map is Ord a => a -> Maybe b. On Sat, Sep 21, 2019, 13:35 Henning Thielemann < lemming@henning-thielemann.de> wrote:
On Sat, 21 Sep 2019, olexandr543--- via Haskell wrote:
My library that can help to optimize using 'case ... of ...' construction if there are multiple (more than at least 5) variants. mm2: The library that can be used for optimization of multiple (Ord a) => a -> b transformations
Isn't this a problem you would solve using Data.Map? _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

On Sat, 21 Sep 2019, Zemyla wrote:
No, because Data.Map is Ord a => a -> Maybe b.
The same applies to the Vector solution ... Or you use lookup as partial function, i.e. (Map.!) :: Map a b -> a -> b.
participants (2)
-
Henning Thielemann
-
Zemyla