Package 

Class ExtensionsKt

    • Method Detail

      • flatMapError

         final <A extends Any> EOr<A> flatMapError(EOr<A> $self, Function1<E, EOr<A>> f)
        Computes a new EOr using E in this, if it exists, with given flat mapping function
        Parameters:
        f - E flat mapping function
      • getOrElse

         final <A extends Any> A getOrElse(EOr<A> $self, Function0<A> default)
        Gets the value in this or falls back to given default value
        Parameters:
        default - Default value to use in case this has E
      • orElse

         final <A extends Any> EOr<A> orElse(EOr<A> $self, Function0<EOr<A>> alternative)
        Provides an alternative EOr if this one has E, ignoring the E
        Parameters:
        alternative - Alternative EOr in case this one has E
      • toEOr

         final <A extends Any> EOr<A> toEOr(A $self)
        Converts this value to a successful EOr
      • toEOr

         final <A extends Any> EOr<A> toEOr(A $self, Function0<E> ifNull)
        Constructs an EOr from this nullable value
        Parameters:
        ifNull - An E to use in case this value is null