package Ġdev . p iment el . rick and mort y . shared . m vi Ċ Ċ import Ġkotlinx . coroutines . Experimental Cor outines Api Ċ import Ġkotlinx . coroutines . flow . Mutable State Flow Ċ Ċ @ Experimental Cor outines Api Ċ interface ĠRed ucer < T > Ġ{ ĊĠĠĠ Ġval Ġmutable State : ĠMutable State Flow < T > ĊĠĠĠ Ġsuspend Ġfun Ġupdate State ( handler : Ġsuspend ĠT . () Ġ-> ĠT ) Ċ } Ċ Ċ @ Experimental Cor outines Api Ċ class ĠRed ucer Impl < T >( ĊĠĠĠ ĠinitialState : ĠT Ċ ) Ġ: ĠRed ucer < T > Ġ{ ĊĊĠĠĠ Ġoverride Ġval Ġmutable State Ġ= ĠMutable State Flow ( initialState ) ĊĊĠĠĠ Ġoverride Ġsuspend Ġfun Ġupdate State ( handler : Ġsuspend ĠT . () Ġ-> ĠT ) Ġ{ ĊĠĠĠĠĠĠĠ Ġmutable State . value Ġ= Ġhandler ( mutable State . value ) ĊĠĠĠ Ġ} Ċ } Ċ