(init: T)
| 226 | ); |
| 227 | |
| 228 | const pState = <T>(init: T) => |
| 229 | defineHandlerFor<State<T>>().with((self) => { |
| 230 | let st = init; |
| 231 | return self |
| 232 | .andThen((x) => [x, st] as const) |
| 233 | .resume("state.get", () => st) |
| 234 | .resume("state.set", (x) => { |
| 235 | st = x; |
| 236 | }); |
| 237 | }); |
| 238 | |
| 239 | test("3.4.5. Return Operations", () => { |
| 240 | expect(safeDivide(1, 0).with(raiseMaybe).runSync()).toEqual(nothing); |
no test coverage detected