Beispiel #1
0
        public void Test01B()
        {
            var source = Synthetic.Create(150);
            var data   = source.Next <int>(500);
            var result = fmap(x => x * 15.0m, data);
            var expect = Lst.map(x => x * 15.0m, data);

            claim.equal(expect, result);
        }
Beispiel #2
0
        public void LstJson05()
        {
            var syn    = Synthetic.Create(RandomSeed.Seed01);
            var input  = syn.Next <string>(500);
            var json   = JsonServices.ToJson(input);
            var output = JsonServices.ToObject <Lst <string> >(json);

            claim.equal(input, output);
        }
Beispiel #3
0
        public void Test01A()
        {
            var F      = Lst.Functor <int, decimal>();
            var f      = func <int, decimal>(x => x * 15.0m);
            var source = Synthetic.Create(150);
            var data   = source.Next <int>(500);
            var result = F.fmap(f)(data);
            var expect = map(x => x * 15.0m, data);

            claim.equal(expect, result);
        }