The type of a function in Rune.
Functions can be called using call expression syntax, such as <expr>()
.
There are multiple different kind of things which can be coerced into a function in Rune:
- Regular functions.
- Closures (which might or might not capture their environment).
- Built-in constructors for tuple types (tuple structs, tuple variants).
Examples
// Captures the constructor for the `Some(<value>)` tuple variant.
let build_some = Some;
assert_eq!;
// Captures the function previously defined.
let build_some = build;
assert_eq!;