Giter VIP home page Giter VIP logo

Comments (3)

jonase avatar jonase commented on June 8, 2024

The following two rules are to blame:

(fn ?args (?fun . ?args)) ?fun
(fn* ?args (?fun . ?args)) ?fun

These rules tries to capture patterns like

(map #(inc %) [1 2 3]) => (map inc [1 2 3])

but since the same pattern is used (idiomatically) when wrapping java methods in functions for higher order use the rules, as they are in 0.0.2, are indeed bad. I'll probably remove these rules for now.

What's needed (in a future release) is a declarative way to embed additional constraints, for example

[(fn ?args (?fun . ?args)) ?fun :when (and (symbol? ?fun) (not-interop-form ?fun))]

from kibit.

tsdh avatar tsdh commented on June 8, 2024

Right, I even had forgotten that (map .javaMethod objs) is not even valid. ;-) In those cases, maybe (map (memfn javaMethod) objs) would be a bit more idiomatic, but right now there's no support for type hinting memfn (http://dev.clojure.org/jira/browse/CLJ-910).

But what's the cause of the second example of mine? Here, the args do not equal the return value, it's just a part of it.

from kibit.

jonase avatar jonase commented on June 8, 2024

I commented out the invalid rules in this commit.

from kibit.

Related Issues (20)

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.