Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var RegisteredFuncs = make(map[string][]*types.FuncValue) // must initialize
RegisteredFuncs maps a function name to the corresponding static, pure funcs.
Functions ¶
func Len ¶
Len returns the number of elements in a list or the number of key pairs in a map. It can operate on either of these types.
func Register ¶
Register registers a simple, static, pure, polymorphic function. It is easier to use than the raw function API, but also limits you to small, finite numbers of different polymorphic type signatures per function name. You can also register functions which return types containing variants, if you want automatic matching based on partial types as well. Some complex patterns are not possible with this API. Implementing a function like `printf` would not be possible. Implementing a function which counts the number of elements in a list would be.
Types ¶
This section is empty.