Trick Signatures
The Tricks section of this book contains descriptions and usage details of all operations that spells can perform. These details include so-called Signatures.
Signatures are short and standardized descriptions of the inputs and outputs a certain trick may take and provide.
An example Signature might look like this:
Vector , Number - > Boolean
This describes a trick that expects a Vector as the first argument and a Number as the second, as counted clockwise from the circle's Divider Pin.
This trick would also provide a Boolean as output, potentially for its parent circle to use.
Aside from commas (,) to separate arguments, and the arrow (->) to distinguish input from output, a few other symbols might show up in signatures, as outlined below:
Number? - > Any
A question mark (?) after an argument indicates that providing the value is optional. One can either leave the argument out completely, or provide void.
Number | Vector - > Any | Void
Often times, one may see two argument or return types being separated by a pipe symbol. (|)
For arguments, these indicate that either of the two types may be used in that position. In return types, it means the trick may return either of the given types, depending on the situation.
[ Any ], Number - > [ Boolean ]
Some inputs or outputs may be wrapped in square brackets. ( [ ]) These indicate that the trick expects or returns a list of exclusively this type of fragment.
{ Any : Boolean }, Any - > Boolean
In other cases, signatures will have two types wrapped in curly braces ( {} ) and split by a colon. (:) This represents a map with keys of the first type, and values of the second.
Spell , Any ... - > Any
Sometimes, three trailing periods (...) will be used after a type. This indicates that after the previous argument, the trick will accept any number of additional arguments of this type.