Skip to content

Instantly share code, notes, and snippets.

View peter-wd-1's full-sized avatar
🏠
Working from home

Peter peter-wd-1

🏠
Working from home
View GitHub Profile
@peter-wd-1
peter-wd-1 / multipleTaskEithersWithArgument.ts
Last active November 24, 2022 04:21
How to run multiple Task | TakeEither W/ argument for each of them.
import { sequenceT } from 'fp-ts/lib/Apply'
import { pipe } from 'fp-ts/lib/function'
import * as RTE from 'fp-ts/ReaderTaskEither'
import * as R from 'fp-ts/Reader'
import * as RA from 'fp-ts/ReadonlyArray'
import * as TE from 'fp-ts/TaskEither'
// (R) => TaskEither<e, r[]>
pipe(
'TestValue',