summaryrefslogtreecommitdiff
path: root/u/fn
diff options
context:
space:
mode:
authorElizabeth Hunt <lizhunt@amazon.com>2025-05-14 18:02:34 -0700
committerElizabeth Hunt <lizhunt@amazon.com>2025-05-14 18:03:15 -0700
commit3a3fb9c8ab0c798a278f76d40de216fa96f6e2c4 (patch)
treebb44512bccceee43c57372a4ae325b5b70a6e192 /u/fn
parentf316b4a015b5b2e2988b250b3c34bbb7f9994709 (diff)
downloadci-3a3fb9c8ab0c798a278f76d40de216fa96f6e2c4.tar.gz
ci-3a3fb9c8ab0c798a278f76d40de216fa96f6e2c4.zip
moar
Diffstat (limited to 'u/fn')
-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!);
}