Companion

Functions

Link copied to clipboard
fun <S> codiagonal(): Optional<Either<S, S>, S>

POptional that takes either S or S and strips the choice of S.

Link copied to clipboard
fun <S> id(): PIso<S, S, S, S>
Link copied to clipboard
operator fun <S, T, A, B> invoke(getOrModify: (source: S) -> Either<T, A>, set: (source: S, focus: B) -> T): POptional<S, T, A, B>

Invoke operator overload to create a POptional of type S with focus A. Can also be used to construct Optional

Link copied to clipboard

Optional to safely operate on the head of a list

Link copied to clipboard

Optional to safely operate on the tail of a list

Link copied to clipboard
Link copied to clipboard
fun <A, B> void(): Optional<A, B>

POptional that never sees its focus