arrow-optics-test
1.1.3-alpha.22
arrow-optics-test
/
arrow.optics.test.laws
/
PrismLaws
Prism
Laws
object
PrismLaws
Content copied to clipboard
Functions
Functions
compose
Modify
Link copied to clipboard
suspend
fun
<
A
,
B
>
Prism
<
A
,
B
>
.
composeModify
(
aGen
:
Arb
<
A
>
,
funcGen
:
Arb
<
(
B
)
->
B
>
,
eq
:
(
A
,
A
)
->
Boolean
)
:
PropertyContext
Content copied to clipboard
consistent
Set
Modify
Link copied to clipboard
suspend
fun
<
A
,
B
>
Prism
<
A
,
B
>
.
consistentSetModify
(
aGen
:
Arb
<
A
>
,
bGen
:
Arb
<
B
>
,
eq
:
(
A
,
A
)
->
Boolean
)
:
PropertyContext
Content copied to clipboard
laws
Link copied to clipboard
fun
<
A
,
B
>
laws
(
prism
:
Prism
<
A
,
B
>
,
aGen
:
Arb
<
A
>
,
bGen
:
Arb
<
B
>
,
funcGen
:
Arb
<
(
B
)
->
B
>
,
eqa
:
(
A
,
A
)
->
Boolean
=
{ a, b -> a == b }
,
eqb
:
(
B
?
,
B
?
)
->
Boolean
=
{ a, b -> a == b }
)
:
List
<
Law
>
Content copied to clipboard
modify
Identity
Link copied to clipboard
suspend
fun
<
A
,
B
>
Prism
<
A
,
B
>
.
modifyIdentity
(
aGen
:
Arb
<
A
>
,
eq
:
(
A
,
A
)
->
Boolean
)
:
PropertyContext
Content copied to clipboard
partial
Round
Trip
One
Way
Link copied to clipboard
suspend
fun
<
A
,
B
>
Prism
<
A
,
B
>
.
partialRoundTripOneWay
(
aGen
:
Arb
<
A
>
,
eq
:
(
A
,
A
)
->
Boolean
)
:
PropertyContext
Content copied to clipboard
round
Trip
Other
Way
Link copied to clipboard
suspend
fun
<
A
,
B
>
Prism
<
A
,
B
>
.
roundTripOtherWay
(
bGen
:
Arb
<
B
>
,
eq
:
(
B
?
,
B
?
)
->
Boolean
)
:
PropertyContext
Content copied to clipboard