- none
- none
:>
implementation ... added to Object Class- refactoring findLucky, maxConsecutiveOnes
- implemented maxDepth
findLucky
^ self frequencies
:> keysAndValuesRemove: #~~
:> keys
:> inject: -1 into: #max:.
maxConsecutiveOnes
^ self groupByRuns: [ :e | e == 1 ]
:> collect: #sumNumbers
:> max.
"this is actually broken"
maxDepth
^ self select: [ :e | '()' includes: e ]
:> collect: [ :e | e == $( ifTrue: 1 ifFalse: -1 ] as: Array
:> scan: #+
:> max.
- ❌ Read How learning Smalltalk can improve your skills as a programmer Article
- ❌ Read Smalltalk Case Statement
- ❌ Implement
switch
/case
in Smalltalk - ❌ Push to SmallTalk Package to github for ⬆️
- ❌ Add Smalltalk impl to YT Video Part 2
- ❌ Try SwitchCase
- ❌ implement groupBy
- Read How learning Smalltalk can improve your skills as a programmer Article
- Read Smalltalk Case Statement
- Implement
switch
/case
in Smalltalk - Push to SmallTalk Package to github for ⬆️
- Add Smalltalk impl to YT Video Part 2
- Try SwitchCase
- implement groupBy