From 98c6786975ad506d2df03ce789f00d94b639187a Mon Sep 17 00:00:00 2001 From: Chris Wilkinson Date: Tue, 8 Feb 2022 13:52:32 +0000 Subject: [PATCH] Use Kleisli arrows --- src/IOEither.ts | 2 +- src/TaskEither.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/IOEither.ts b/src/IOEither.ts index 3bb24e49f..449ee0644 100644 --- a/src/IOEither.ts +++ b/src/IOEither.ts @@ -269,7 +269,7 @@ export const orElseFirstW: ( * @since 2.11.8 */ export const orElseFirstIOK: (onLeft: (e: E) => IO) => (ma: IOEither) => IOEither = (onLeft) => - orElseFirst(flow(onLeft, rightIO)) + orElseFirst(fromIOK(onLeft)) /** * @category combinators diff --git a/src/TaskEither.ts b/src/TaskEither.ts index 133e158d3..114cadbfe 100644 --- a/src/TaskEither.ts +++ b/src/TaskEither.ts @@ -362,7 +362,7 @@ export const orElseFirstW: ( */ export const orElseFirstIOK: (onLeft: (e: E) => IO) => (ma: TaskEither) => TaskEither = ( onLeft -) => orElseFirst(flow(onLeft, rightIO)) +) => orElseFirst(fromIOK(onLeft)) /** * @category combinators @@ -370,7 +370,7 @@ export const orElseFirstIOK: (onLeft: (e: E) => IO) => (ma: TaskEith */ export const orElseFirstTaskK: (onLeft: (e: E) => Task) => (ma: TaskEither) => TaskEither = ( onLeft -) => orElseFirst(flow(onLeft, rightTask)) +) => orElseFirst(fromTaskK(onLeft)) /** * @category combinators