Comments (2)
function find_where (coll, attrs) {
return .find(coll, __(.identity, _.partial(is_matched, _, attrs)))
}
이렇게 pipe와 identity를 이용해서 해결했습니다.
partial을 적용한 iterator의 " _ " 자리에 find가 3개의 parameter를 넘겨주면 1개의 parameter가 "_"에 채워지고 나머지 2개의 parameter는 attrs 뒤에 자동으로 채워져서 (1st, attrs, 2nd, 3rd) 형태가 되어서 생긴 문제였습니다.
자동 커링된_.every함수에는 (1st, attrs)형태로 2nd, 3rd가 제거된 상태로 parameter가 넘어가야 했기 때문입니다.
지금같은 상황에서는 _.partial을 적용한 함수에는 채워지고 남은 parameter가 자동으로 제거되도록 할 필요가 있다고 생각되는데 그것이 상황에 따라 필요한 case라면 option으로 처리하는 것도 괜찮을 듯 합니다.
혹시 제가 놓친 더 나은 방법이 있다면 조언 부탁드립니다 :) 감사합니다
from partial.js.
아 그렇네요! 해결도 잘하셨고 말씀주신 아이디어도 좋은거 같습니다. 새로 만들고 있는 버전에서 해당 부분들 고민 잘해서 적용해보겠습니다.
from partial.js.
Related Issues (10)
- typo in README.md and Official site. HOT 1
- pipe 내에서의 extend 사용 방법 문의 HOT 2
- npm 설치시 에러가 발생합니다. HOT 1
- 문의드립니다.(함수 사용에 관해서) HOT 1
- 지금까지 내가 찾아왔던 라이브러리입니다. HOT 2
- _.all HOT 2
- toArray에 대해서 문의드립니다. HOT 4
- [RFC] Support Typescript HOT 1
- 오타가 있습니다.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from partial.js.