I suggest that every valued function include a “help” option as a possible first parameter ($1). This option provides a brief output of information about the use of the function, parameters and examples. In order not to litter the log help is displayed only in the CLI
for example:
:global myFunc do={
:if ($1="help") do={:put "usage:"
:put "[\$myFunc] - delete global functions and variables"
:put "[\$myFunc all] - delete all scripts, global functions and variables"
:return []}
:if ($1="all") do={.....}
}
It seems to me that this will not greatly increase the volume of scripts and will be a “rule of good form”.