This repository was archived by the owner on Dec 23, 2021. It is now read-only.

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