Giter Club home page Giter Club logo

Comments (2)

nonownonow avatar nonownonow commented on August 16, 2024

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.

indongyoo avatar indongyoo commented on August 16, 2024

아 그렇네요! 해결도 잘하셨고 말씀주신 아이디어도 좋은거 같습니다. 새로 만들고 있는 버전에서 해당 부분들 고민 잘해서 적용해보겠습니다.

from partial.js.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.