Created
June 5, 2020 14:35
-
-
Save TheBotBox/43587ef07c3024de4f8e71b2b384e5c4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inline fun <reified T> Any.ofType(block: (T) -> Unit) { | |
if (this is T) { | |
block(this as T) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment