[Haskell-beginners] Enum/Bounded question

Henk-Jan van Tuyl hjgtuyl at chello.nl
Mon Dec 13 20:44:52 CET 2010


On Mon, 13 Dec 2010 18:49:39 +0100, Patrick LeBoutillier  
<patrick.leboutillier at gmail.com> wrote:

> 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
>

No

Regards,
Henk-Jan van Tuyl


-- 
http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
--



More information about the Beginners mailing list