gcanti / fp-ts-fluture

fp-ts bindings for Fluture

Home Page:https://gcanti.github.io/fp-ts-fluture/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fp-ts bindings for Fluture

Documentation

Example

import { reject, resolve, fork } from 'fluture'
import { future } from 'fp-ts-fluture/lib/Future'
import { array } from 'fp-ts/lib/Array'

array
  .sequence(future)([resolve(1), reject('oops')])
  .pipe(fork(e => console.error('Error:', e))
    (console.log), // => "Error: oops"
  )
array
  .sequence(future)([resolve(1), resolve(2)])
  .pipe(fork(console.error)
    (console.log), // => [1, 2]
  )

About

fp-ts bindings for Fluture

https://gcanti.github.io/fp-ts-fluture/

License:MIT License


Languages

Language:TypeScript 100.0%