withState package:universum

withState f m executes action m on a state modified by applying f.