-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Add ability to run a task with a list of arguments #539
Comments
I came across this problem again, and actually figured out a workaround!
This converts a reporter task from something that takes a number of arguments to one that takes a list. You use it like so:
though it would be somewhat inefficient. Better to store the result of It essentially creates a task of the following form: |
nice. very clever |
see also discussion at https://groups.google.com/d/msg/netlogo-devel/9o87_jxNvvo/nLVoLAnhEQAJ |
recently requested again at https://groups.google.com/d/msg/netlogo-devel/b1c-mtScapQ/Hc3bXGq8BgAJ |
Fixes #539 These are being left as __ for now and may be promoted later (possibly with a different name).
Basically, add lisps
apply
to NetLogo.Example:
apply task foo [ "one" "two" "three"]
One potential criticism of this is that it doesn't allow as much compile-time checking as normal
run
, but I'm not sure that even counts as a criticism.Inspired by: http://stackoverflow.com/questions/21541133/run-a-task-with-a-variable-number-of-arguments-in-netlogo
The text was updated successfully, but these errors were encountered: