Reference
Introspection
Type of
| Input | An argument of any type. |
|---|---|
| Output | The canonical runtime type name as a string. |
Signature
type_of(a: Any): StringExample
type_of([1, 2, 3]) // returns "List"Function name
| Input | A function value. |
|---|---|
| Output | The function's intrinsic name as a string. |
Signature
function_name(a: Function): StringExample
function_name(num_add) // returns "num_add"Function arity
| Input | A function value. |
|---|---|
| Output | The number of parameters accepted by the function. |
Signature
function_arity(a: Function): NumberExample
function_arity(num_add) // returns 2Function parameters
| Input | A function value. |
|---|---|
| Output | The function parameter names as a list of strings, in declaration order. |
Signature
function_parameters(a: Function): ListExample
function_parameters(num_add) // returns ["a", "b"]