Compare commits

..

No commits in common. "e220b7930cea8fb8777469e859b8a6a3d258d1b7" and "baab2e75d9e618a9a7ab49d76e094a341782733d" have entirely different histories.

2 changed files with 1 additions and 7 deletions

View File

@ -22,7 +22,7 @@ export const eitherChain =
fa._tag === 'Right' ? f(fa.right) : fa fa._tag === 'Right' ? f(fa.right) : fa
export const fold = export const fold =
<A, E, B>(onLeft: (e: E) => B, onRight: (a: A) => B) => <A, B, E>(onLeft: (e: E) => B, onRight: (a: A) => B) =>
(fa: Either<A, E>): B => (fa: Either<A, E>): B =>
fa._tag === 'Left' ? onLeft(fa.left) : onRight(fa.right) fa._tag === 'Left' ? onLeft(fa.left) : onRight(fa.right)

View File

@ -174,11 +174,5 @@ export const tryCatch = <A>(f: () => A): Either<A, Error> => {
} }
} }
export interface Tag<T> {
readonly _tag: T
}
export const hasTag = (x: string) => (y: Tag<string>) => x === y._tag
export const fromNullable = <A>(a: A | null | undefined): Option<A> => export const fromNullable = <A>(a: A | null | undefined): Option<A> =>
a == null ? none : some(a) a == null ? none : some(a)