Created
October 6, 2021 17:59
-
-
Save devrath/9e825f61e026c624aee4f2b0bc1f80cd to your computer and use it in GitHub Desktop.
This file contains hidden or 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 main() { | |
| println("Start") | |
| initiateUploadingImage(service) | |
| println("End") | |
| } | |
| fun initiateUploadingImage( | |
| imageUpload:(image :String)->Boolean | |
| ) { | |
| val result = imageUpload("/Desktop") | |
| println("Result returned is $result") | |
| } | |
| val service = { image :String -> | |
| println("Image from location `$image` is uploaded") | |
| true | |
| } | |
| /********** OUTPUT: | |
| Start | |
| Image from location `/Desktop` is uploaded | |
| Result returned is true | |
| End | |
| *****************/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment