patrickmichalina/typescript-monads

View on GitHub
src/either/either.factory.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import { Either } from './either'
import { IEither } from './either.interface'

export function either<L, R>(left?: L, right?: R): IEither<L, R> {
  return new Either(left, right)
}