Skip to content

Instantly share code, notes, and snippets.

View arthurgubaidullin's full-sized avatar

Artur Gubaidullin arthurgubaidullin

View GitHub Profile
import { pipe } from 'fp-ts/lib/function';
import type { Separated } from 'fp-ts/lib/Separated';
import * as S from 'fp-ts/lib/Separated';
import type { Task } from 'fp-ts/lib/Task';
import type { TaskEither } from 'fp-ts/lib/TaskEither';
import * as TE from 'fp-ts/lib/TaskEither';
export const traversePar =
<T, E, A>(poolLimit: number, task: (t: T) => TaskEither<E, A>) =>
(dataList: T[]): Task<Separated<E[], A[]>> =>