Chaining an array of promises

Typically, when we have multiple unrelated asynchronous tasks, we want to execute them concurrently and possibly combine the results when all tasks are completed. Occasionally, though, »

PromiseKit and `ensure`

Update: PromiseKit added ensureThen (discussion). Intro The essence of functional programming is to express computation in small, self contained units (functions) that we can combine together »

Logging errors in Swift

Error reporting and handling is tricky. In C, it's done by returning and examining error codes, which is very error prone since it's easy to forget »