No description, website, or topics provided.
Swift
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Example.playground
Nifty
NiftyTests
Sources
Tests
.gitignore
LICENSE
Nifty-Rounded.png
Nifty.png
Nifty.xcf
Package.swift
README.md

README.md

Nifty

Documentation.

Nifty is a library of asynchronous utilities for everyday programmers.

Major features:

  • Streams (based on Java 8)
  • Channels (based loosely on Go)
  • Futures / Promises

Minor features:

  • Continuation monad
  • Either enum

Nifty's concurrency is implemented via DispatchKit.

(1..<100).stream()
  .map { $0 * 2 }
  .flatMap { ($0..<100).stream() }
  .reduce(0, combine: +) // Run asynchronously. Returns Future
  .onComplete { print($0) }

Streams

Documentation.

Use streams to get seamless concurrent and lazy composition of data.

Futures

Documentation.

Use futures to easily perform operations asynchronously, without callback hell.

Channels

Documentation.

Channels allow you to easily receive data from other threads.