Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

%& for anonymous function syntax. #599

Open
jaymanmdev opened this issue Dec 29, 2024 · 0 comments
Open

%& for anonymous function syntax. #599

jaymanmdev opened this issue Dec 29, 2024 · 0 comments

Comments

@jaymanmdev
Copy link

Is your feature request related to a problem? Please describe.
I am attempting to create a function like so:

(defn $ [w] #(apply [w] %&))

however, %& is producing interesting JavaScript output that differs largely to Clojure's usage of %&.

Describe the solution you'd like
I'd like for this feature to be compiled in a similar way to how Clojure and Clojurescript utilise it.
e.g. right now, it is compiled into:
image
when it should be compiled into something like:

var $ = function (w) {
  return function (first, ...rest) {
    return squint_core.apply([w], rest);
  }
}

Is this out of scope of Squint or is this a reasonable request?

Describe alternatives you've considered
N/A

Additional context
N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant