Type Macro
Type Macro
Verse has a special construct that can be used to get the type of an arbitrary expression (similar to decltype in modern C++): type. It can be used anywhere a type can be used. For example,
Verse has a special construct that can be used to get the type of an arbitrary expression (similar to decltype in modern C++): type. It can be used anywhere a type can be used. For example,
| | Foo() : int = 0 |
| --- | --- |
| | Bar(X : type{Foo()}) : type{Foo()} = X |
Copy full snippet
It is particularly useful to describe the types of functions, and it is required to give the result type of a function as another function with non-default effects. For example,
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.