arrow-fx / arrow.fx / Ref / modify
abstract fun <B> modify(f: (A) -> Tuple2<A, B>): Kind<F, B>
Like update but allows the update function to return an output value of type B.
Do you like Arrow?