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]
)
gcanti / fp-ts-fluture Goto Github PK
View Code? Open in Web Editor NEWfp-ts bindings for Fluture
Home Page: https://gcanti.github.io/fp-ts-fluture/
License: MIT License