Treehouse Intermediate Course - Part 4 (Generics 2)

The run continues! Though just a short-ish entry today as I only have around half an hour. More time tomorrow, then nothing for Friday through to Sunday! But the main thing is I have momentum! Let's crack on with generics! Start Time - 10:08 Code challenge - Wow this looks hard! Let's try breaking it down... OK, so we have a [T] type and the transformation of (T) -> U - these need to be in the parameters. The return is type U. The return is then a square function. Let's try some things out! Opening a playground! func map<T, U>(array: [ T ], transformation: ( T ) -> U ) -> U { } That seems to make sense so far! For the next bit though....just gonna check back the previous video as the transformation part has flummoxed me! Ah ok, I think I'm on to something. I need to do a separate function for the square, then put that into the transformation bit.... func map<T, U>(array: [ T ], transformation: ( T ) -> U...