[Haskell] Re: Enum class
simons at cryp.to
Sun Jan 9 01:56:58 EST 2005
Jaime Nino writes:
> I would like to write a function with type
> next :: Enum a => a -> a
> which will wrap a values around [...].
You'll need (Bounded a, Enum a) to implement that. The
function you are looking for is 'maxBound'. Enumerable types
are not necessarily bounded in the general case, just think
of the natural numbers for an example of an enumerable set
that is not.
More information about the Haskell