[squeak-dev] Re: #firstOrLess: and #lastOrLess: ?
Chris Muller
asqueaker at gmail.com
Thu Sep 3 14:40:39 UTC 2015
If you *DID* implement a new method, I'd call it, "upToFirst:".
someObjects upToFirst: 5
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
|