I\'m trying to do this sort of thing ..
static var recycle: [Type: [CellThing]] = []
but - I can\'t :)
Und
If you extend the Dictionary type you can use the already defined generic Key directly.
extension Dictionary {
// Key and Value are already defined by type dictionary, so it's available here
func getSomething(key: Key) -> Value {
return self[key]
}
}
This works because Dictionary already has generics Key and Value defined for it's own use.