gitocello
gitocello copied to clipboard
Doubled method definition
This comes from https://github.com/frankshearar/PersistentUnionFind/blob/master/Extensions/Dictionary.st -
!Dictionary methodsFor: '*PersistentUnionFind' stamp: 'fbs 1/2/2012 14:21'!
elementsOfClass: aParentObject
^ ((self associations
select: [:assoc | (assoc value = aParentObject) or: [assoc key = aParentObject]]
thenCollect: [:assoc | {assoc key. assoc value.}])
inject: #()
into: [:acc :each | acc , each]) asSet asArray! !
!
!Dictionary methodsFor: '*PersistentUnionFind' stamp: 'fbs 1/2/2012 13:57'!
elementsOfClass:: aParentObject
^ ((self associations
select: [:assoc | (assoc value == aParentObject) or: [assoc key == aParentObject]]
thenCollect: [:assoc | {assoc key. assoc value.}])
inject: #()
into: [:acc :each | acc , each]) asSet asArray! !
Oh dear, never mind. Note the second method's name: #elementsOfClass::
as opposed to #elementsOfClass:
. Sigh!
Actually, what is interesting is that I have deleted #elementsOfClass::
from my image (and the package saved, of course), but the git repo wasn't told about that.