void | |
---|---|
Type: | §Void |
A value used to symbolize the absence of a value.
The value plays a special role in code-bracket, where it is the only allowed value of all but the last expression.
Often used as the default value for an optional function argument, when the actual value being used by default is derived from other arguments.
| |
See also: | ignore |
identity | |
---|---|
Type: | §Function |
A convenient function of one argument, that simply returns the argument.
The Shapes core has some optimizations that recognize this function, so, when possible, prefer to use over any user-defined function with the same behavior.
|
if | ||
---|---|---|
predicate::§Boolean consequence alternative:void → §Void | ||
Conditional evaluation. If predicate holds, evaluates to consequence, otherwise evaluates to alternative.
|
•time | |
---|---|
Type: | §•Time |
Represents the ever-changing state being the current time. It's main characteristic is nothing but that; one can be sure that it will change from one peek of it to the next. So what's the use of it? For semantic reasons, it shall be required by the kernel's non-pure functions that interact with the outside world in such a way that the result may be different from one invocation to another (and would otherwise not have any state parameters). Another obvious use of •time is to simply ask for the time. Please refer to §•Time for details. |
error | |
---|---|
kind::§Symbol source::§String message::§String details:void cause:void → §Void | |
Constructs an §Exception located to the point where error was called, and passes it to C—error. For most values of kind, cause is not used; when used, it provides additional information used to format message.
The values of kind used by the core (see §Exception) affect how message is formatted, and the value of kind must be in agreement with how it is used by the core (with some exceptions explained below).
If kind is 'type_mismatch, the expected type shall be described in message, and the value causing the error (not a description of its type!) shall be passed in cause.
|
C—error | |
---|---|
Purpose: | General-purpose error-handling. |
Expects type: | §Exception |
Default binding: | Abort program evaluation, providing the message and backtrace to the compiler for display. |
By using a dedicated escape continuation rather than an immediatly aborting construct, it is possible to detect and recover in some error situations.
|
ignore | |
---|---|
Type: | §Void |
Swallow anything and return void instead.
If an impure function has both side effects and a return value, may be used to only get the side effects when the impure call is not at the end of a code bracket.
|
•ignore | |
---|---|
Type: | §•Ignore |
To be used when a state parameter is required by a non-pure function, but one does not care about the result. |
bindings | |
---|---|
::§DynamicBindings ::§DynamicBindings ...::§DynamicBindings → §DynamicBindings | |
Dynamic references: | none |
Combines dynamic bindings. Can be used instead of repeating the operator &.
|
nullbind | |
---|---|
Type: | §DynamicBindings |
May be used when combinding several dynamic bindings, and one would like — for clarity of notation — to use exactly one operator & for each dynamic binding; not having the operator for the first (or last, depending on how you see things) will break symmetry and make it difficult to indent source code nicely.
|