Treehouse Intermediate Course - Part 3 (Generics 1)
Yes the momentum continues! Today the aim is to cover half of the Generics bits. I know a bit about these but can't think much else other than downcasting/upcasting. There'll be more for sure! Also, I am going to ensure to do the extra reading parts, where relevant, as well as any coding practice. Start Time - 15:04 Writing Repetitive Code So generics presumably means using the 'any' type and avoid using repetitive code. So I was right in that sense! Also, this links to the F1 quiz I've done before, which is in dire need of other options. Need to have sections for drivers, teams or difficulty level...I had to give up on that project back in January. Back to the course! Loops for example are an elegant construct - much better than typing out verbose code! func swapInts( _ a: Int , b: Int ) { var tempA = a a = b b = tempA } swapInts ( 4 , b: 7 ) ...