9 Jan
2005
9 Jan
'05
6:56 a.m.
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