[Cuis-dev] [Change set] Collection>>#flatten

Hernan Wilkinson hernan.wilkinson at 10pines.com
Sat May 18 13:18:40 PDT 2019


Hi Gaston, Facu,
 yes! sorry for the delayed answer, too many things to do :-)

 It is on github now but with a change. The problem with your
implementation was that it created new result collection per element of the
collection to flatten (recursively). I changed it to use a WriteStream and
avoid that problem. Doing so, I found and fixed a bug related to using
WriteStream with OrderedCollection, it did not work (we should tests if
streamContents: works for all SequenceableCollection subclass, I did not
have the time for that).

 Thanks!
 Hernan.

On Fri, May 17, 2019 at 8:06 PM Gastón Caruso via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

> Hi! Have you had the chance to look this?
>
> On Thu, May 16, 2019, 00:44 Gastón Caruso <gstn.caruso at gmail.com> wrote:
>
>> Hi all! Facu Gelatti and I implemented flatten for Collection.
>>
>> As a special case, we've considered strings as values, not as collections
>> (Pharo does the same). i.e.:
>> { 'hello' } flatten => { 'hello' }  *and NOT*  { $h . $e . $l . $l . $o }
>>
>> Here is the change set with code changes and tests.
>>
>> Let us know what you think.
>> Thanks!
>>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>


-- 

*Hernán WilkinsonAgile Software Development, Teaching & Coaching*
*Phone: +54-011*-4893-2057
*Twitter: @HernanWilkinson*
*site: http://www.10Pines.com <http://www.10pines.com/>*
Address: Alem 896, Floor 6, Buenos Aires, Argentina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20190518/f2a78abc/attachment.html>


More information about the Cuis-dev mailing list