timfel/gitocello — Issue #9: Doubled method definition
Author: frankshearar
Created: 2012-01-08 15:20:42+00:00
State: open

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! !