Avatar
omochimetaru 8/15/2017 5:54 AM
let types: [Animal.Type] = [Cat.self, Cat.self, Dog.self] print(types.reduce(into: [:]) { (d, x) in d[ObjectIdentifier(x)] = x })
5:55 AM
なるほど > ObjectIdentifierを型のハッシュ化目的で使った
5:55 AM
↑できた。 ありがとうございます。