Hi

#(1 2 3 4 1 2 3 5 6 ) collectGroupsWhere:  [ :each | each = 4])

2017-12-12 10:23 GMT+01:00 Pavel Krivanek <[email protected]>:

> Hi,
>
> do you have some proposals for a better name for the message named
> #aggregateRuns?
>
> (#(1 2 3 4 1 2 3 5 6 ) aggregateRuns:  [ :each | each = 4])
>     >>> #(#(1 2 3) #(4) #(1 2 3 5 6)).
>
> (#(1 2 3 4 1 2 3 4 5 6 ) aggregateRuns:  [ :each | each = 4])
>     >>> #(#(1 2 3) #(4) #(1 2 3) #(4) #(5 6)).
>
> ((1 to: 12) aggregateRuns:  [ :each | (each \\ 3) = 0])
>     >>> #(#(1 2) #(3) #(4 5) #(6) #(7 8) #(9) #(10 11) #(12)).
>
> The current comment is:
> "Answer a new collection of the same species as the
> receiver with elements being collections (of the receiver
> species) containing those elements of the receiver
> for which the given block consecutively evaluates to
> the same object."
>
> https://pharo.fogbugz.com/f/cases/20864/add-examples-to-
> SequenceableCollection-aggregateRuns
>
> Cheers,
> -- Pavel
>

Reply via email to