All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.extensions.EitherAs.kt Maven / Gradle / Ivy

There is a newer version: 0.1.0-alpha.3
Show newest version
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