SwiftWalmart
Implementing compactMap
Extend Array with a myCompactMap that behaves like the standard library's compactMap. How would you write the generic signature?
Implementing compactMap
Extend Array with a myCompactMap that behaves like the standard library's compactMap. How would you write the generic signature?
SwiftShort answerBasics
Extend Optional so that any optional can be asked for its nil status, like someOptional.i…
#extension #optional
SwiftShort answerAdvanced
Suppose there were no question-mark optional syntax and no standard Optional. If you had …
#generics #optional
SwiftMultiple choiceIntro
Which of these unwrap an optional safely? Pick all that apply.
#optional
SwiftMultiple choiceExpert
What does this code print? …
#extension