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

Legible generators #9

Open
Roger-luo opened this issue Apr 29, 2019 · 1 comment
Open

Legible generators #9

Roger-luo opened this issue Apr 29, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@Roger-luo
Copy link
Collaborator

Sometimes, the input of a function can be generators, while the function itself will produce a lambda:

I took this example from Yao

I'm expecting the following to give

kron(X for _ in 1:5)

n -> kron(n, X for _ in 1:5)

but I got

(n -> kron(n, Base.Generator{UnitRange{Int64},getfield(Main, Symbol("##3#4"))}(getfield(Main, Symbol("##3#4"))(), 1:5)))

I'm not sure if this requires some upstream change, but it would be nice to support it.

@Roger-luo Roger-luo added the enhancement New feature or request label Apr 29, 2019
@Roger-luo
Copy link
Collaborator Author

I investigate this issue a bit, it seems the problem is we don't know the signature (including the variable name) of the given function which is actually #10

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

1 participant