DAY #45

Shareplay

You can use the “where” clause to specify generics. This is another part of what has been described in day 10 and 26.

1
  func aFunction<T where T: isOfSomeClass>(parameter: T) {}

Originally published 09/30/2021 @ https://pittcsc.org/ Discord

Published here on 09/16/2022. Blog published date reflects the original date of publication.