I have this code and I was wondering if I can transform the below pipes into just one pipe?
const result: TE.TaskEither<DataTransferError, readonly CoinMetadataDto[]> = pipe(
this.ensureFundsExist(),
TE.chain((funds) => {
return pipe(
funds.map((fund) => {
return this.coinGeckoAdapter.getCoinMetadata(fund.coinGeckoId);
}),
TE.sequenceArray,
);
}),
);
In other words can I map a TaskEither<E, Data[]> into a TaskEither<E, OtherData[]> in one go?