Closed robrix closed 9 years ago
Parameterize Graph by C: CollectionType instead of T. Replace Identifier with C.Index. Replace nodes: [Identifier: T] with nodes: C.
Graph
C: CollectionType
T
Identifier
C.Index
nodes: [Identifier: T]
nodes: C
The lack of higher-rank types makes map a bit obnoxious to express with this, but that’s livable.
map
Parameterize
Graph
byC: CollectionType
instead ofT
. ReplaceIdentifier
withC.Index
. Replacenodes: [Identifier: T]
withnodes: C
.