ElvishJerricco / Nifty

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

License:MIT License


Languages

Language:Swift 100.0%