# Invalid

data class Invalid<out E>(val value: E) : Validated<E, Nothing>

## Constructors

fun <out E> Invalid(value: E)

## Functions

inline fun all(predicate: (Nothing) -> Boolean): Boolean
inline fun <B> bifoldLeft(    c: B,     fe: (B, E) -> B,     fa: (B, Nothing) -> B): B
inline fun <B> bifoldMap(    MN: Monoid<B>,     g: (E) -> B,     f: (Nothing) -> B): B
inline fun <EE, B> bimap(fe: (E) -> EE, fa: (Nothing) -> B): Validated<EE, B>

From arrow.typeclasses.Bifunctor, maps both types of this Validated.

inline fun <EE, B> bitraverse(fe: (E) -> Iterable<EE>, fa: (Nothing) -> Iterable<B>): List<Validated<EE, B>>
inline fun <EE, B, C> bitraverseEither(fe: (E) -> Either<EE, B>, fa: (Nothing) -> Either<EE, C>): Either<EE, Validated<B, C>>
inline fun <B, C> bitraverseNullable(fe: (E) -> B?, fa: (Nothing) -> C?): Validated<B, C>?
inline fun <B, C> bitraverseOption(fe: (E) -> Option<B>, fa: (Nothing) -> Option<C>): Option<Validated<B, C>>
inline fun exist(predicate: (Nothing) -> Boolean): Boolean

Is this Valid and matching the given predicate

inline fun findOrNull(predicate: (Nothing) -> Boolean): Nothing?
inline fun <B> fold(fe: (E) -> B, fa: (Nothing) -> B): B
inline fun <B> foldLeft(b: B, f: (B, Nothing) -> B): B

apply the given function to the value with the given B when valid, otherwise return the given B

inline fun <B> foldMap(MB: Monoid<B>, f: (Nothing) -> B): B
fun isEmpty(): Boolean
fun isNotEmpty(): Boolean
inline fun <B> map(f: (Nothing) -> B): Validated<E, B>

Apply a function to a Valid value, returning a new Valid value

inline fun <EE> mapLeft(f: (E) -> EE): Validated<EE, Nothing>

Apply a function to an Invalid value, returning a new Invalid value. Or, if the original valid was Valid, return it.

fun swap(): Validated<Nothing, E>
inline fun tap(f: (Nothing) -> Unit): Validated<E, Nothing>

The given function is applied as a fire and forget effect if this is `Valid`. When applied the result is ignored and the original Validated value is returned

inline fun tapInvalid(f: (E) -> Unit): Validated<E, Nothing>

The given function is applied as a fire and forget effect if this is `Invalid`. When applied the result is ignored and the original Validated value is returned

fun toEither(): Either<E, Nothing>

Converts the value to an Either

fun toList(): List<Nothing>

Convert this value to a single element List if it is Valid, otherwise return an empty List

fun toOption(): Option<Nothing>

Returns Valid values wrapped in Some, and None for Invalid values

open override fun toString(): String
fun toValidatedNel(): ValidatedNel<E, Nothing>

Lift the Invalid value into a NonEmptyList.

inline fun <EE, B> traverse(fa: (Nothing) -> Either<EE, B>): Either<EE, Validated<E, B>>
inline fun <B> traverse(fa: (Nothing) -> Option<B>): Option<Validated<E, B>>
inline fun <B> traverse(fa: (Nothing) -> Iterable<B>): List<Validated<E, B>>
inline fun <EE, B> traverseEither(fa: (Nothing) -> Either<EE, B>): Either<EE, Validated<E, B>>
inline fun <B> traverseNullable(fa: (Nothing) -> B?): Validated<E, B>?
inline fun <B> traverseOption(fa: (Nothing) -> Option<B>): Option<Validated<E, B>>
fun void(): Validated<E, Unit>

Discards the A value inside Validated signaling this container may be pointing to a noop or an effect whose return value is deliberately ignored. The singleton value Unit serves as signal.