コード例 #1
0
        public void TestApplyRWithTernaryFunction()
        {
            Func <int, int, int, int> AddAllAndMultiply = (a, b, c) => (a + b) * c;
            var multiplyWith5 = AddAllAndMultiply.ApplyR(5);

            Assert.AreEqual(25, multiplyWith5(2, 3));
        }
コード例 #2
0
        public void TestApplyR()
        {
            var remainderOfDivisionBy5 = Remainder.ApplyR(5);

            Assert.AreEqual(4, remainderOfDivisionBy5(24));
        }