Java가 기본으로 제공하는 함수형 인터페이스
- java.lang.funcation 패키지
- 자바에서 미리 정의해둔 자주 사용할만한 함수 인터페이스
- Function<T, R>
- BiFunction<T, U, R>
- Consumer
- Supplier
- Predicate
- UnaryOperator
- BinaryOperator
Function<T, R>
Function<Integer, String> integerToString = (number) -> Integer.toString(number);
System.out.println(integerToString.apply(10));
.compose()와 .andThen()을 사용해서 함수를 조합할 수 있다.
BiFunction<T, U, R>