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.

Peter

_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to