🎉 Black Friday Sale! Save 30% when you subscribe today.
Do you think it’s possible to define a function of the form (Never) -> A
for any type A
? That seems impossible since Never
is a type in Swift that cannot be constructed. It has no values whatsoever.
Well, it is possible to construct such a function, and it’s a little absurd. This video is an excerpt from our episode on the connection between Swift’s type system and exponentiation from algebra.
Our free plan includes 1 subscriber-only episode of your choice, access to 64 free episodes with transcripts and code samples, and weekly updates from our newsletter.