summaryrefslogtreecommitdiff
path: root/u/fn/either.ts
diff options
context:
space:
mode:
Diffstat (limited to 'u/fn/either.ts')
-rw-r--r--u/fn/either.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/u/fn/either.ts b/u/fn/either.ts
index eaf77fd..12240d0 100644
--- a/u/fn/either.ts
+++ b/u/fn/either.ts
@@ -1,4 +1,4 @@
-import type { Mapper, Supplier } from "./mod.ts";
+import type { Mapper, Supplier } from "@emprespresso/pengueno";
export interface IEither<E, T> {
mapBoth: <Ee, Tt>(
@@ -21,7 +21,7 @@ export class Either<E, T> implements IEither<E, T> {
return Either.right(okBranch(this.ok!));
}
- public flatMap<Tt>(mapper: Mapper<T, Either<E, Tt>>) {
+ public flatMap<Tt>(mapper: Mapper<T, Either<E, Tt>>): Either<E, Tt> {
if (this.ok) return mapper(this.ok);
return Either.left<E, Tt>(this.err!);
}