commonMain.extensions.EitherAs.kt Maven / Gradle / Ivy
package com.javiersc.either.extensions
import com.javiersc.either.Either
/** Transform this as Either.Left */
public fun L.asLeft(): Either = Either.Left(this)
/** Transform this as Either.Right */
public fun R.asRight(): Either = Either.Right(this)
/** Transform first as Either.Left */
public fun Pair.asLeft(): Either = Either.Left(first)
/** Transform second as Either.Right */
public fun Pair.asRight(): Either = Either.Right(second)
© 2015 - 2024 Weber Informatics LLC | Privacy Policy