-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Provide a way of iterating over all defined functions #468
Comments
All currently-defined symbols can be accessed via the Starting from there you can obviously get whatever you want (note: there was a tiny issue with the REPL not handling nested templates well, but it has also been fixed as per the latest PR). For example: This returns an array of tuples (name / description) for each of the defined built-in functions. 😉 map select keys symbols => [function?.builtin var] 'sym -> @[sym, get info.get sym 'description] This is pretty much the same like: map
select keys symbols 'sym [
function?.builtin var sym
]
'sym [
@[
sym,
get info.get sym 'description
]
] P.S. That being said, the whole thing reminds that I have to add dictionary support for all the remaining functions in the Iterators module, so that e.g. you can select the items you want from a given dictionary and get back a dictionary. I always end up using similar things (as would be the case here), but I still haven't implemented it for Arturo... :S |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing issue as stale. |
Issue is still active. |
@drkameleon How should we name this? |
Good question. It could be |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing issue as stale. |
It would be great to have a function that allows introspection over all defined functions (possibly scoped by some of the functions' metadata) in order to be able to act on the other metadata. I can see this being helpful for tooling (e.g. a language server that might want to provide prioritized auto-completion when in a particular module, etc.).
Maybe this is already there and I missed it (since I guess something like this is being used to generate some of the documentation).
The text was updated successfully, but these errors were encountered: