Example #1
0
    public void TestTransform()
    {
        ParserMonad <int> p = text => Tuple.Create(int.Parse(text.Substring(0, 5)), text.Substring(5));
        var q = p.Transform(e => e * e);

        q("00005wonder").AssertEquals(Tuple.Create(25, "wonder"));
    }