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

Dynamic functions don't bind anonymous functions as arguments #660

Closed
scolsen opened this issue Feb 2, 2020 · 3 comments
Closed

Dynamic functions don't bind anonymous functions as arguments #660

scolsen opened this issue Feb 2, 2020 · 3 comments

Comments

@scolsen
Copy link
Contributor

scolsen commented Feb 2, 2020

It's possible to get around this by simply binding every function one needs to a name, but that can be quite inconvenient at times.

A simple example:

(defndynamic apply [f x] (f x))
(apply (fn [x] x) 1)
=> I couldn’t find the symbol 'f' at line 1, column 2 in 'REPL'.

Maybe you wanted one of the following?
    /=
    <=
    =>
    >=
    IO
    fmt
    for
    id
    or
(defndynamic id [x] x)
(apply id 1)
=> 1

Quoting the anonymous function doesn't solve the issue either.

Possibly related to #659 #460

@sdilts
Copy link
Contributor

sdilts commented Feb 8, 2020

Was this fixed in #664 ?

@hellerve
Copy link
Member

hellerve commented Feb 8, 2020

It seems to work now, so I guess so :)

@scolsen
Copy link
Contributor Author

scolsen commented Feb 9, 2020

WOO!

@hellerve the champion

@scolsen scolsen closed this as completed Feb 9, 2020
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

3 participants