
14 Jul
2006
14 Jul
'06
5:30 a.m.
"Johan Holmquist"
If Day (and Month) where NOT instances of Bounded, the following would be possible:
[Saturday .. Tuesday] => should return [Saturday, Sunday, Monday, Tuesday] => but returns []
This does seem like a reasonable argument to me. Some enumerations are semantically cyclic, rather than linear. But how do you feel about the way it breaks some algebraic laws? fromEnum x < fromEnum (succ x) fromEnum x > fromEnum (pred x) Of course, such laws are not explicitly stated anywhere in the definition of the classes, so one would be foolish to rely on them in any case. Regards, Malcolm