Please use Swift 4.1 and above
Create a function squaredSums6 with one argument aCollection of Int. Using the
filter and reduce return the sum of the squares ofthe even elements of the array. So an input
of [1,2,3] would return 2*2 = 4.
Please read the question carefully. The question is asking for afunction with one argument a collection of Int. Sothe type of the parameter MUST beCollection. We can’t use the typeof array for the parameter so the parameter type needs to be namedCollection.
Probably something like the following code but I receive anerror which says I need to define it as generics.
func squaredSums6(a:Collection<int>)
PayPal Gateway not configured
PayPal Gateway not configured