dimsuz
02/10/2022, 2:35 PMset
has type A -> S -> T
, but actual set
implementations seem to have it reversed: S -> A -> T
.
Screenshots are from: api docs
Similarly main page of Arrow Optics mentions set: A -> S -> S
, but then has an example of playerLens.set(player, health)
. Am I reading this wrong or is this a little bug?simon.vergauwen
02/10/2022, 2:48 PMoperator fun <S, T, A, B> invoke(get: (S) -> A, set: (S, B) -> T): PLens<S, T, A, B>
https://arrow-kt.io/docs/apidocs/arrow-optics/arrow.optics/-p-lens/-companion/invoke.htmlsimon.vergauwen
02/10/2022, 2:49 PMdimsuz
02/10/2022, 3:24 PM