Dec. 12, 2017
12:33 p.m.
Thanks sean. I will build it because for example I had list of lines and I needed to split the input depending on patterns inside the lines.... and sadly this was not for an advent of code. Rmoders suggested aggregateRuns: splitOn: but this is not the same. Stef On Tue, Dec 12, 2017 at 2:33 AM, Sean P. DeNigris <sean@clipperadams.com> wrote:
Stephane Ducasse-3 wrote
#(1 2 3 4 1 2 3 5 6 ) consumeUntil: [:each | each = 4)
{#(1 2 3 4) . #( 1 2 3 5 6 )}
The shortest kernel thing I could come up with took two steps: `{ #(1 2 3 4 1 2 3 5 6 ) copyUpThrough: 4. #(1 2 3 4 1 2 3 5 6 ) copyAfter: 4 }`. The splitting messages seem to all eat the separator.
----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html