Example #1
0
        public void ListApplicative()
        {
            var numbers   = list(2, 4, 6);
            var functions = list <Func <int, int> >(x => x * 2, x => x * 3, x => x * 4);
            var expect    = from f in functions
                            from x in numbers
                            select f(x);

            var result = Lst.Apply <int, int>().apply(functions, numbers);

            claim.equal(expect, result);
        }