fp-ts-contrib icon indicating copy to clipboard operation
fp-ts-contrib copied to clipboard

Make `batchTraverse` pipe-able

Open SRachamim opened this issue 4 years ago • 0 comments

🚀 Feature request

Make batchTraverse pipe-able.

Current Behaviour

Last invocation of batchTraverse requires the data (first) and the function (last):

import * as TE from 'fp-ts/TaskEither'
import { batchTraverse } from 'fp-ts-contrib/batchTraverse'


pipe(
  /** ... */
  (ass) => batchTraverse(TE.taskEither)(ass, f),
  /** ... */
)

Desired Behavior

batchTravers should be pipe-able with data-last:

import * as TE from 'fp-ts/TaskEither'
import { batchTraverse } from 'fp-ts-contrib/batchTraverse'


pipe(
  /** ... */
  batchTraverse(TE.taskEither)(f),
  /** ... */
)

SRachamim avatar Nov 03 '20 18:11 SRachamim