Promise in swift? Write your own
What is Promise?
To me, Promise is just to make async call in a linguistic representation for
human read.
Think about it:
somethingAsync{ ok in
use(ok)
...
anotherAsync{ ok2 in
...
}
}
It help when we can organise them into:
when{ done in
somethingAsync{ value in
done(value)
}
} ==>
(ok:{ value in