syntax - What does the arrow ( -> ) between two types mean in Swift? -


while researching separate issue, came across question: how create generic closures in swift

they have function definition this:

func savewithcompletionobject(obj : anyobject, success : anyobject -> void, failure : void -> void) 

what -> in anyobject -> void mean?

it’s function type. anyobject -> void type of function accepting anyobject , returning void.


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -