예제 #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);
        }
예제 #2
0
파일: LstJson.cs 프로젝트: 0xCM/Meta.Core
        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);
        }
예제 #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);
        }