In addition to the standard types in Verse, there are some additional constructs that can be used the way you would use a type, but that technically are not types. void
is one such construct.
When used as the result of a function, it indicates that the function can return any value, but when invoked, it will provide no particular result of interest.
For example:
Foo() : void = {}
This means that Foo will succeed, but will not return a value.
For example:
FirstInt(X:int, :void) : int = X
Technically, void can be thought of as a function defined as
void(:any) : true
When used as a type, you can think of it as being applied to whatever is assigned to the corresponding typed identifier.
Using a function in a type position is only allowed for a void
function. Functions used in this way are known as functors.