ziad
07/16/2017, 9:24 PMfunc MyFunction() : String {
var myReturnVariable : String //Can't seem to get this to be a val
callTo3rdPartyFunction {
//Do things
myReturnVariable = "hello!"
}
return myReturnVariable
}
gjesse
07/16/2017, 9:28 PMgjesse
07/16/2017, 9:29 PMreturn callTo3rd {
// do stuff
}.let {
// transform stuff to myReturn
}
ziad
07/16/2017, 9:31 PM"Created item with ID " + X
where X is the result of what happened in that closure.gjesse
07/16/2017, 9:33 PMziad
07/16/2017, 9:33 PMgjesse
07/16/2017, 9:33 PMziad
07/16/2017, 9:34 PMval x = 3rdPartyFunc { //stuff }
gjesse
07/16/2017, 9:35 PMgjesse
07/16/2017, 9:44 PMziad
07/16/2017, 10:12 PMgjesse
07/16/2017, 10:25 PMgjesse
07/16/2017, 10:25 PMgjesse
07/16/2017, 10:26 PMziad
07/16/2017, 10:30 PM