A nice read. What audience is it aimed at? Some grammar suggestions...
Sets are collections that only contains one element.
Being pedantic ;) the following Set does more than "contain one element"... (Set new) add: 1; add: 2. so maybe... "Sets are unordered collections where elements do not repeat. " (??)
isIsogramSetImplementation isIsogramFatestImplementation
might be shortened to "isIsogramBySet" and "isIsogramByFindString"
To define a method as class extension
To define a method as "a" class extension
and move the methods we define as class extension
and move the methods we define as class extension"s"
verifie
"verify"
Because the user of the method will not have the
This seems an incomplete sentence.
either return always a collection as for that we convert the character ...
"either always return a collection (thus we convert the character ... )" cheers -ben On Sat, Nov 12, 2016 at 7:19 AM, stepharo <stepharo@free.fr> wrote:
I pair programmed with my middle son and we got the following chapter.
Now going to bed :)
Le 11/11/16 à 16:13, Damien Pollet a écrit :
On 11 November 2016 at 12:02, stepharo <stepharo@free.fr> wrote:
String>>#isIsogram | letters | letters := Dictionary new. self do: [ :x | letters at: x ifAbsent: [] ifPresent: [ ^false ].
Yes I did that one too and I was surprised because it was as slow as the bag implementation.
Anyone tried replacing the dictionary with an array of 26 booleans and indexing based on ascii, or even a SmallInteger and bit shifting?