305 Views
W've seen that Futures/Promises emerge as a logical meaning for asynchronous functions like in this Node example fs.readFile('...') // => a Future/Promise Similarly, we w'd like to represent the meaning of functions like this someEventSource.on('event', ...) // => ? The second code shares the asynchronous semantics of the first, hence the use of callbacks in both cases.
0 comments