Associated Types in Swift

Context When working on Swift protocols, you might need to use generic types as a variable. Swift compiler can understand when you provide a protocol as a variable, but what if you want to use a type? Here is an example of implementing a data structure based on protocols. protocol A { } protocol B… Continue reading Associated Types in Swift

Published
Categorized as iOS