Look up functions

In Dyon, you get all available functions with functions:

fn main() {

You can write a program that looks up the information about a function:

fn main() {
    fs := functions()
    has_foo := any i { fs[i].name == "foo" }
    if has_foo {
        why := why(has_foo)

fn foo() {}
{returns: "void", type: "loaded", arguments: [], name: "foo"}

Because Dyon uses dynamic modules, functions is the only standard way of obtaining this information. This can only be known in the loaded module.