public function testRun() { $this->assertEquals(Reader::of(2)->chain(function ($x) { return Reader::ask()->map(function ($y) use($x) { return $x + $y; }); })->run(20), 22, 'Runs.'); }
public function testAsk() { $this->assertEquals(Reader::of(2)->chain(function ($x) { return Reader::ask()->map(function ($y) use($x) { return $x + $y; }); })->run(4), 6, 'Accesses environment.'); }