/** * Takes a default and a nullable value, if the value is not nully, turn it * into a `Right`, if the value is nully use the provided default as a `Left`. * * @tsplus static Either.Ops fromNullable */ export function fromNullable(a: A, e: LazyArg): Either> { return a == null ? Either.left(e()) : Either.right(a as NonNullable) }