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

Function to generate a call from the def Dict #2

Open
oxinabox opened this issue Mar 9, 2020 · 2 comments
Open

Function to generate a call from the def Dict #2

oxinabox opened this issue Mar 9, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@oxinabox
Copy link
Member

oxinabox commented Mar 9, 2020

Given the dict returned by splitdef
it would be useful to have a function the generate a Expr(:call,... to the function that is defined.

e.g.

julia> k = splitdef(:(f(x::Int) = 2x))
Dict{Symbol,Any} with 4 entries:
  :args => Any[:(x::Int)]
  :body => quote
  :name => :f
  :head => :(=)

julia> call_expr(k) == :(f(x))

This is basically a much simpler version of combinedef

@omus
Copy link
Contributor

omus commented Mar 10, 2020

That's reasonable. I'd have to think about naming a little more here

@oxinabox
Copy link
Member Author

oxinabox commented Jul 2, 2021

In a meaningful way #17 addresses this.
Not entirely, though.

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

No branches or pull requests

2 participants