arrow-optics / arrow.optics.typeclasses / Index / fromIso

fromIso

fun <S, A, I, B> fromIso(ID: Index<A, I, B>, iso: Iso<S, A>): Index<S, I, B>

Lift an instance of Index using an Iso.

Parameters

ID - Index instance to provide a Optional to focus into S at I

iso - Iso that defines an isomorphism between a type S and A

Return Index for a structure S to focus in an optional A at a given index I

Do you like Arrow?

Arrow Org
<