SequenceableCollection>>#beginsWith:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

SequenceableCollection>>#beginsWith:

Hannes Hirzel
Hello

is it just an omission or is there a reason that
SequenceableCollection does not have #beginsWith:

--Hannes


beginsWith: aSequenceableCollection
"Answer true if the receiver starts with the argument collection"
 (aSequenceableCollection isEmpty or: [self size <
aSequenceableCollection size]) ifTrue: [^false].
  aSequenceableCollection withIndexDo: [:each :index | (self at:
index) ~= each ifTrue: [^false]].
 ^true

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: SequenceableCollection>>#beginsWith:

Clément Béra
Hey,

I missed it a lot too. I added it to my personal project.

Best


2013/10/29 H. Hirzel <[hidden email]>
Hello

is it just an omission or is there a reason that
SequenceableCollection does not have #beginsWith:

--Hannes


beginsWith: aSequenceableCollection
"Answer true if the receiver starts with the argument collection"
 (aSequenceableCollection isEmpty or: [self size <
aSequenceableCollection size]) ifTrue: [^false].
  aSequenceableCollection withIndexDo: [:each :index | (self at:
index) ~= each ifTrue: [^false]].
 ^true

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: SequenceableCollection>>#beginsWith:

Hannes Hirzel
On 10/29/13, Clément Bera <[hidden email]> wrote:
> Hey,
>
> I missed it a lot too. I added it to my personal project.

You mean in your fork of Amber?
If not how did you do it?

H.


> Best
>
>
> 2013/10/29 H. Hirzel <[hidden email]>
>
>> Hello
>>
>> is it just an omission or is there a reason that
>> SequenceableCollection does not have #beginsWith:
>>
>> --Hannes
>>
>>
>> beginsWith: aSequenceableCollection
>> "Answer true if the receiver starts with the argument collection"
>>  (aSequenceableCollection isEmpty or: [self size <
>> aSequenceableCollection size]) ifTrue: [^false].
>>   aSequenceableCollection withIndexDo: [:each :index | (self at:
>> index) ~= each ifTrue: [^false]].
>>  ^true
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "amber-lang" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [hidden email].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.