MultiMethod type

MultiMethod, container for methods.

Direct parent types

Eachable1
Eachable which each() calls the callback with one argument
Direct subtypes: 16

Constructors

MultiMethod(methods:Arr)
Construct MultiMethod from the given methods

Returns

MultiMethod
MultiMethod() Source: bootstrap.ngs:54
Create MultiMethod with no methods

Methods

Arr(mm:MultiMethod)
Get methods of a MultiMethod

Returns

Arr
Bool(mm:MultiMethod) Source: bootstrap.ngs:60
Whether MultiMethod has any methods
each(mm:MultiMethod, cb:Fun) Source: stdlib.ngs:141
Call cb for each method of the MultiMethod

Example

echo.each(F(method) echo("${method.params().name.join(", ")}"))
init(mmd:MultiMethodDescription, containing_nd:NamespaceDescription, name:Str, multimethod:MultiMethod)
Undocumented
inspect(mm:MultiMethod) Source: stdlib.ngs:6003
Inspect MultiMethod

Returns

Lines
len(mm:MultiMethod) Source: bootstrap.ngs:57
Number of methods in MultiMethod
Str(mm:MultiMethod) Source: stdlib.ngs:144
Undocumented