Created
December 12, 2018 19:32
-
-
Save felixchez/7a3154985b5321ff019b03c6b7c3e205 to your computer and use it in GitHub Desktop.
kotlin_notnullable_function_callback
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
fun doAsyncOperation(val onCallback: (String) -> Unit?) { | |
// do lengthy computation operation | |
onCallback("result") | |
} | |
=== | |
doAsyncOperation { _ -> } | |
doAsyncOperation {result -> Log.v(result)} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment