crow/misc.crow (source)
new void() bare
== bool(anonymous void, anonymous void) bare
<=> comparison(anonymous void, anonymous void) bare
new[t] spec
newt()
copy[t] spec
copyt(at)
key[t] spec t data, t compare, t hash-mix
datacomparehash-mixSpec for values that can be used as keys in a map or set.
to[out, in] spec
toout(ain)
Spec for functions that convert in to out.
break-or-continue[t] union
loop-breaktloop-continuevoid
new[t] t break-or-continue()
Default is to 'continue'
data[t] spec builtin
Specifies that a type must be immutable data.
This includes most types in crow that are not mut.
This does not include future or ref, though these types work with shared.
To put it another way, a type works with data if it is:
* A primitive like nat, an enum, or flags.
* A record with no mut fields, whose fields are all data.
* A union whose member types are all data.
* Immutable collections like x[], where the type arguments are all data.
* A constant pointer like nat*.
shared[t] spec builtin
Specifies that a type must be safe to share between tasks that may run in parallel.
Anything that satisfies data satisfies shared.
void builtin
Empty type, for use by functions with nothing in particular to return.