Left<L, R> constructor

Left<L, R>(
  1. L value
)

Creates a Left with the given value. If EitherConfig.errorLogger is set and in debug mode, logs a non-null error value.

Implementation

Left(this.value) {
  final logger = EitherConfig.errorLogger;
  if (kDebugMode && logger != null) {
    if (value case final Object error) logger(error);
  }
}