For HWS+ subscribers: Adding constraints to a generic function might sound like it limits what you can do, but it actually unlocks more functionality, and it lets the compiler use static dispatch to generate faster code. www.hackingwithswift.com/plus/interme...
Understanding generics – part 1 – Hacking with Swift+
Generics are one of the most powerful features of Swift, allowing us to write code once and reuse it in many ways. In this article we’ll explore how they work, why adding constraints actually helps us...
hackingwithswift.com