example\ApplicatorLiftTest::test_it_should_sum_all_from_one_list_with_single_element PHP Метод

test_it_should_sum_all_from_one_list_with_single_element() публичный Метод

    public function test_it_should_sum_all_from_one_list_with_single_element()
    {
        // sum <$> [1, 2] <*> [4, 5]
        $sum = f\curryN(2, 'example\\sum');
        $a = Listt::of([1, 2]);
        $b = Listt::of([4, 5]);
        $result = f\map($sum, $a)->ap($b);
        $this->assertEquals(Listt::of([5, 6, 6, 7]), $result);
    }