[Haskell-cafe] Re: Why is Day and Month bounded?

Johan Holmquist holmisen at gmail.com
Sat Jul 15 07:07:54 EDT 2006

2006/7/14, David House <dmhouse at gmail.com>:
> On 14/07/06, Johan Holmquist <holmisen at gmail.com> wrote:
> > > You mean  [Monday, Tuesday ... Sunday, Monday] ?
> >
> > Actually not. No repetitions.
> That seems like a very bad idea. '..' normally means 'inclusive',
> breaking those semantics would be a very weird thing to do, and breaks
> the principle of least surprise.

Good point. When I think about it [Monday .. Monday] should probably
not return the same as [Tuesday .. Monday].

(Ofcourse a new class would not permit the use of the [X .. Y]
notation if not added to the language somehow.)

More information about the Haskell-Cafe mailing list