keen/misc
SourceThis is a standard module
and does not need to be explicitly imported.
void builtinlambda-data[r, p] builtinlambda-mut[r, p] builtinreference[t] record (has private fields)Wraps a value in a mutable record.
global spec builtinunsafe spec builtinjava spec builtinjs spec builtinnew[t] specnew t()list-new[col, elem] speclist-new col(elems elem[])copy[t] speccopy t(a t)to[output, input] specto output(a input)Spec for functions that convert
input to output.data[t] spec builtinSpecifies that a type must be immutable data.
This includes most types that are not mut.
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*.
subscript[r, p] r(a r data(p), params p)Calls the function and returns its return value.
subscript[r, p] r(a r shared(p), params p)subscript[r, p] r(a r mut(p), params p)identity[t] t(a t)Returns its argument. Useful for writing
it.identity to create a lambda instead of of x then x.noop[output, input] output(_ input) output newIgnores the input and returns an empty value. Useful for writing
it.noop to create a lambda instead of of _ then ().