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 -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -