인프런 커뮤니티 질문&답변
products => filter() 가 filter()가 된 이유
작성
·
244
0
1. products => filter(p => p.price < 20000)(products)
1단계: 변형
2. products ⇒ filter(p ⇒ p.price < 20000) 인자 하나만 들어 왔다.
2단계: 부분 해석
따라서 (...) => f(a, ...) 함수를 리턴한다.
(...) => f(a, ...) (products) 와 같다.
로 이해했는데 맞나요?





