state method

S state(
  1. S s
)

Implementation

S state(S s) => run(s).value2;