Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gcanti/fp-ts-fluture
fp-ts bindings for Fluture
https://github.com/gcanti/fp-ts-fluture
fluture fp-ts functional-programming typescript
Last synced: 16 days ago
JSON representation
fp-ts bindings for Fluture
- Host: GitHub
- URL: https://github.com/gcanti/fp-ts-fluture
- Owner: gcanti
- License: mit
- Created: 2017-08-08T12:52:27.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-03-10T07:16:14.000Z (over 4 years ago)
- Last Synced: 2024-10-12T20:11:17.406Z (about 1 month ago)
- Topics: fluture, fp-ts, functional-programming, typescript
- Language: TypeScript
- Homepage: https://gcanti.github.io/fp-ts-fluture/
- Size: 106 KB
- Stars: 50
- Watchers: 6
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-fp-ts - gcanti/fp-ts-fluture
README
[fp-ts](https://github.com/gcanti/fp-ts) bindings for [Fluture](https://github.com/fluture-js/Fluture)
# Documentation
- [API Reference](https://gcanti.github.io/fp-ts-fluture)
# Example
```ts
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]
)
```