What are Protocols? How do We Use Them?
A protocol defines a “blueprint of methods, properties, and other requirements that suit a particular task or piece of functionality”. They can give also give nominal types polymorphic behavior. In Swift, the “protocol can then be adopted by a class, structure [a struct], or enumeration [an enum] to provide an actual implementation of those requirements.... » read more