[Haskell-beginners] Enum/Bounded question

Patrick LeBoutillier patrick.leboutillier at gmail.com
Mon Dec 13 18:49:39 CET 2010


Hi,

I'm looking for a function to make a list of all the constructors in a
type that derives both Enum and Bounded, i.e.

enumAll :: (Bounded a, Enum a) => [a]
enumAll = [minBound .. maxBound]

Does this function exists in the standard modules?


Patrick

-- 
=====================
Patrick LeBoutillier
Rosemère, Québec, Canada



More information about the Beginners mailing list