Update "Either" type generic order

This commit is contained in:
Eric Rumsey 2025-05-27 12:32:49 -05:00
parent e897ca7848
commit 773fcc7ef3

View File

@ -1,6 +1,6 @@
export type Left<E> = {readonly _tag: 'Left', readonly left: E}
export type Right<A> = {readonly _tag: 'Right', readonly right: A}
export type Either<E, A> = Left<E> | Right<A>
export type Either<A, E> = Right<A> | Left<E>
// Constructors
export const left = <E>(e: E): Either<E, never> => ({