W Wrapl, The Programming Language

Libraries Std.Symbol

Types

T

Inherits from:
The type of all symbols (a.k.a. multimethods).

ArrayT

NoMethodMessageT

An instance of this type is sent when no signature is found to match a method call.

Constants

Default : T

Default is called whenever a symbol call fails to match any signature. I.e. if symbol has no signature matching args..., then the call symbol(args...) is then treated as Default(symbol, args...). Since Default is an instance of T, this allows for a certain degree of meta-programming.

If Default itself fails to match a signature, then it sends an instance NoMethodMessageT.

Functions

Get(symbol @ T, signature...) : Std.Function.T

Returns the entry in symbol which matches signature to function or fails if no matching entry is found.

New() : T

Returns a new unnamed symbol

Set(symbol @ T, function @ Std.Function.T, signature...) : Std.Function.T

Adds a new entry to symbol which matches signature to function.

Returns function.

Methods

:"@"(_ @ NoMethodMessageT, _ = Std.String.T)

:"@"(_ @ T, _ = Std.String.T)

:values(_ @ Std.Symbol.ArrayT)