Did you know that Kotlin can smart-cast a variable in response to calling your own functions? Well, today we’re going to use Kotlin's experimental Contracts feature to make that happen!
Contracts proposal:
https://github.com/Kotlin/KEEP/blob/m...
✨ New to Kotlin? Start here: https://typealias.com/start/
... or pick up the new Leanpub Edition! https://book.typealias.com/
🚀 I just launched a new email newsletter!
Sign up here: https://newsletter.typealias.com/