A common Swift problem is that extensions of generics can only be constrained to protocols. We use a lot of big words here but this issue is quite common and a simple example will…