Skip to content

rnkyr/promise-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

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.

About

A basic Promise pattern implementation in Swift

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages