Skip to content

Instantly share code, notes, and snippets.

@devrath
Created October 6, 2021 17:59
Show Gist options
  • Select an option

  • Save devrath/9e825f61e026c624aee4f2b0bc1f80cd to your computer and use it in GitHub Desktop.

Select an option

Save devrath/9e825f61e026c624aee4f2b0bc1f80cd to your computer and use it in GitHub Desktop.
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