Today I noticed that the sequence 'A' ... 'AA'
contains only one element:
> 'A' ... 'AA'
(A)
I thought it would contain 27: the alphabet plus the final AA
.
If I explicitly provide a generator, it does:
> 'A', *.succ ... 'AA'
(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z AA)
The docs say that the default generator is either *.succ
or *.pred
depending on how the end points compare. But:
> 'A' cmp 'AA'
Less
So it seems I should be getting the *.succ
generator by default. I'm definitely not getting the *.pred
generator:
> 'A', *.pred ... 'AA'
Decrement out of range
in whatevercode at <unknown file> line 1
What's going on here?