modify Get
abstract suspend fun <B> modifyGet(f: (A) -> <ERROR CLASS><A, B>): <ERROR CLASS><A, B>
Content copied to clipboard
ModifyGet allows to inspect state A, update it and extract a different state B. In contrast to modify, it returns a Pair of the updated state A and the extracted state B.
See also
for an example