Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { sequence } from "fp-ts/lib/Traversable";
- import { TaskEither, taskify, taskEither } from "fp-ts/lib/TaskEither";
- import { array } from "fp-ts/lib/Array";
- const atev: Array<TaskEither<NodeJS.ErrnoException, void>> = files.map(file =>
- write(file.fileName, file.content, {})
- );
- const teav: TaskEither<NodeJS.ErrnoException, Array<void>> = sequence(
- taskEither, array
- )(atev);
Add Comment
Please, Sign In to add comment