[squeak-dev] Re: #firstOrLess: and #lastOrLess: ?
Eliot Miranda
eliot.miranda at gmail.com
Thu Sep 3 15:07:16 UTC 2015
Sent from my iPhone
> On Sep 3, 2015, at 7:40 AM, Chris Muller <asqueaker at gmail.com> wrote:
>
> If you *DID* implement a new method, I'd call it, "upToFirst:".
>
> someObjects upToFirst: 5
I find this slightly ambiguous with upTo: and upThrough:. Why not atMostFirst: and atMostLast: ?
>
> However, I don't think its worth expanding the API; I would just do
>
> someObject first: (5 min: someObject size)
>
> It's not that hard to read.
>
>> On Thu, Sep 3, 2015 at 9:32 AM, marcel.taeumel <Marcel.Taeumel at hpi.de> wrote:
>> It's no "collect" but a "first: n", which returns the first n elements from a
>> collection. So #nextAvailable: reads nice but this is stream semantics.
>> There is no #next for collections.
>>
>>
>>
>> --
>> View this message in context: http://forum.world.st/firstOrLess-and-lastOrLess-tp4847874p4847907.html
>> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>>
>
More information about the Squeak-dev
mailing list
|