Skip to content

70 Function declaration references ​

double.function names the declaration with a checked function signature. The resulting value can expose metadata and can still be called.

norm
Integer double(Integer value) { return value * 2 }

main() {
  Function<Integer(Integer)> action = double.function
  printLine(action.name())
  printLine(action(7))
}

Expected output:

text
double
14

Try it: Rename double and let the compiler update the reference.

Precise rules: Reference.

Norm 0.25