Re: Enhanced enumerations

2007-03-19 Thread Andy Armstrong
On 19 Mar 2007, at 21:31, Jonathan Lang wrote: Some (many?) enumerations represent cycles, where incrementing from the last element takes you back to the first: the seasons, the months, the days of the week, the hues, etc. How hard would it be to write a module that lets you say something like:

Enhanced enumerations

2007-03-19 Thread Jonathan Lang
Some (many?) enumerations represent cycles, where incrementing from the last element takes you back to the first: the seasons, the months, the days of the week, the hues, etc. How hard would it be to write a module that lets you say something like: enum weekdays is cycle So that Sat++ eqv Sun