public < B > State < S , B > mapState ( Fn1 < ? super Tuple2 < A , S > , ? extends Product2 < B , S > > fn ) { return state ( s -> fn . apply ( run ( s ) ) ) ; }
Map both the result and the final state to a new result and final state .