예제 #1
0
  @Test
  public void testBiFuncInPlace() {

    assertThat(
        Curry.curry2((Integer i, Integer j) -> "" + (i + j) + "hello").apply(1).apply(2),
        equalTo("3hello"));
  }
예제 #2
0
  @Test
  public void testMethodRef() {

    assertThat(Curry.curry2(this::mult).apply(3).apply(2), equalTo(6));
  }
예제 #3
0
  @Test
  public void testBiFunc() {

    BiFunction<Integer, Integer, String> fn = (i, j) -> "" + (i + j) + "hello";
    assertThat(Curry.curry2(fn).apply(1).apply(2), equalTo("3hello"));
  }