Reference

Introspection

Type of

Input An argument of any type.
Output The canonical runtime type name as a string.

Signature

type_of(a: Any): String

Example

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): String

Example

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): Number

Example

function_arity(num_add) // returns 2

Function parameters

Input A function value.
Output The function parameter names as a list of strings, in declaration order.

Signature

function_parameters(a: Function): List

Example

function_parameters(num_add) // returns ["a", "b"]