On 18 May 2014, at 18:50, Eliot Miranda <eliot.mira...@gmail.com> wrote:

> 
> 
> 
> On May 18, 2014, at 7:59 AM, kilon alios <kilon.al...@gmail.com> wrote:
> 
>> yes I know, I was just wondering if that was normal behaviour because it 
>> looks quite confusing to me. 
> 
> Personally I find it a natural way of expressing an empty interval.  to: is 
> syntactic sugar for to:by:, and so the default of 1 for the step (the by: 
> arg) is expected.
> 
> I'm dissatisfied however that I can't write $A to: $Z, or 1 to: Infinity 
> positive (or 1 to: Float inf, ugh).

Since there is Character>>#to: you can actually write $A to: $Z although it 
returns an Array instead of a String, but that can be solved with

  ($a to: $z) as: String

or

  String withAll: ($a to: $z)

> Eliot (phone)
>> On Sun, May 18, 2014 at 4:49 PM, Eliot Miranda <eliot.mira...@gmail.com> 
>> wrote:
>> Hi Kilon,
>> 
>> On May 18, 2014, at 6:32 AM, kilon alios <kilon.al...@gmail.com> wrote:
>> 
>> > while I was recording my Interval video tutorial I observed that Interval 
>> > does not behave as I would expect . Even though (1 to: 100) works as I 
>> > expect, (1 to: -100) does not. In case of ( 1 to: -100) it created the 
>> > interval object but it does not populate it with the numbers.
>> >
>> 
>> You have to say
>>         1 to: -100 by: -1
>> 
>> > I would expect it to populate the interval with the numbers or at least 
>> > fail with an error. This does not look to me like normal behaviour.
>> >
>> > (-100 to: 1) on the other hand work as expected.
>> >
>> > Any thoughts on this issue ?
>> 
>> 


Reply via email to