by ufo · 13y ago · 0 comments
var a = await someBigFunc()
or do
a <- someBigFunc()
Javascript in its current state is not built for supporting CPS programming very well. You often end up needing to reimplement control flow primitives like while loops, break statements and exception handling since those don't play nice with async stuff. a <- doFirstThing()
b, c <- doSecondThing(a)
doFinalThing(b + c)