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

Select function no i #1

Closed
mschauer opened this issue Apr 25, 2021 · 6 comments
Closed

Select function no i #1

mschauer opened this issue Apr 25, 2021 · 6 comments

Comments

@mschauer
Copy link

It would be nice to have a “s-“ version to select function i from a wrangler and run it
with given arguments (same for all i)

@tisztamo
Copy link
Owner

It seems also possible to add full indexing support, like w[i](args...) . Would that help you?

@tisztamo
Copy link
Owner

tisztamo commented Apr 25, 2021

Now I see your sample: https://discourse.julialang.org/t/event-handler/59937/4

Indexing with a variable cannot be type-stable, but a new s- function may be able to speed up your code, if the wrangler is not very long (or the frequently called fns are at the beginning). To execute the i-th function, the wrangler must be iterated from 1 to i.

@mschauer
Copy link
Author

Yes, I have a second step where a wrangler is very natural so perhaps nice to use it also for the switch type statement.

@tisztamo
Copy link
Owner

I have added sindex, please check the master branch to see if it helps you!

@tisztamo tisztamo reopened this Apr 25, 2021
tisztamo added a commit that referenced this issue Apr 25, 2021
@mschauer
Copy link
Author

This works for me.

@tisztamo
Copy link
Owner

Great! v0.1.3 is released.

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

2 participants