Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 492 Bytes

README.md

File metadata and controls

14 lines (11 loc) · 492 Bytes

Promise

A lightweight implementation of a Promise patter in Swift with a list of handy features such as mapping, merging, and recovery.

Promise<[Int]>.merge([p1, p2, p3])
    .always { print("") }
    .catch { print("_rejected: \($0)") }
    .cancelled { print("_cancelled") }
    .result { print("_got \($0)") }
    .always { print("_always") }

Refer to feature/tests branch for a complete, tested framework.