Ejemplo n.º 1
0
        public void ReduceWithStartIterates()
        {
            IFn fn = DummyFn.CreateForReduce();

            object[]  array = new object[] { 2, 3, 4 };
            IArraySeq a     = ArraySeq.create(array);
            object    ret   = a.reduce(fn, 20);

            Expect(ret, EqualTo(29));
        }
Ejemplo n.º 2
0
        public void ReduceWithStartIterates()
        {
            IFn fn = DummyFn.CreateForReduce();

            object[]  array = new object[] { 2, 3, 4 };
            IArraySeq a     = ArraySeq.create(array);
            object    ret   = a.reduce(fn, 20);

            Expect(ret).To.Be.An.Instance.Of <long>();
            Expect((long)ret).To.Equal(29);
        }