Companion

object Companion

Functions

Link copied to clipboard
fun <A1, A2, B1, B2> eitherToPValidated(): PIso<<ERROR CLASS><A1, B1>, <ERROR CLASS><A2, B2>, <ERROR CLASS><A1, B1>, <ERROR CLASS><A2, B2>>

PIso that defines the equality between Either and Validated

Link copied to clipboard
fun <A, B> eitherToValidated(): Iso<<ERROR CLASS><A, B>, <ERROR CLASS><A, B>>

Iso that defines the equality between Either and Validated

Link copied to clipboard
fun <S> id(): Iso<S, S>

create an PIso between any type and itself. Id is the zero element of optics composition, for any optic o of type O (e.g. PLens, Prism, POptional, ...): o compose Iso.id == o

Link copied to clipboard
operator fun <S, T, A, B> invoke(get: (S) -> A, reverseGet: (B) -> T): PIso<S, T, A, B>

Invoke operator overload to create a PIso of type S with target A. Can also be used to construct Iso

Link copied to clipboard
fun <A> listToOptionNel(): Iso<List<A>, <ERROR CLASS><<ERROR CLASS><A>>>

Iso that defines equality between a List and NonEmptyList

Link copied to clipboard
fun <A, B> listToPOptionNel(): PIso<List<A>, List<B>, <ERROR CLASS><<ERROR CLASS><A>>, <ERROR CLASS><<ERROR CLASS><B>>>

PIso that defines equality between a List and NonEmptyList

Link copied to clipboard
fun <K> mapToSet(): Iso<Map<K, Unit>, Set<K>>

Iso that defines the equality between a Unit value Map and a Set with its keys

Link copied to clipboard
fun <A, B> nullableToOption(): PIso<A?, B?, <ERROR CLASS><A>, <ERROR CLASS><B>>
Link copied to clipboard
fun <A, B> nullableToPOption(): PIso<A?, B?, <ERROR CLASS><A>, <ERROR CLASS><B>>

PIso that defines the equality between the nullable platform type and Option.

Link copied to clipboard
fun <A> optionToEither(): Iso<<ERROR CLASS><A>, <ERROR CLASS><Unit, A>>

Iso that defines the equality between and arrow.core.Option and arrow.core.Either

Link copied to clipboard
fun <A> optionToNullable(): Iso<<ERROR CLASS><A>, A?>

PIso that defines the isomorphic relationship between Option and the nullable platform type.

Link copied to clipboard
fun <A, B> optionToPEither(): PIso<<ERROR CLASS><A>, <ERROR CLASS><B>, <ERROR CLASS><Unit, A>, <ERROR CLASS><Unit, B>>

Iso that defines the equality between and arrow.core.Option and arrow.core.Either

Link copied to clipboard
fun <A, B> optionToPNullable(): PIso<<ERROR CLASS><A>, <ERROR CLASS><B>, A?, B?>

PIso that defines the equality between Option and the nullable platform type.

Link copied to clipboard
fun stringToList(): Iso<String, List<Char>>

Iso that defines equality between String and List of Char

Link copied to clipboard
fun <A, B> validatedToEither(): Iso<<ERROR CLASS><A, B>, <ERROR CLASS><A, B>>

Iso that defines equality between Validated and Either

Link copied to clipboard
fun <A1, A2, B1, B2> validatedToPEither(): PIso<<ERROR CLASS><A1, B1>, <ERROR CLASS><A2, B2>, <ERROR CLASS><A1, B1>, <ERROR CLASS><A2, B2>>

PIso that defines equality between Validated and Either