The absurd function

Episode Clip • Free • Apr 5, 2023

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.


Subscribe to Point-Free

👋 Hey there! If you got this far, then you must have enjoyed this post. You may want to also check out Point-Free, a video series covering advanced programming topics in Swift. Consider subscribing today!