return.md 806 B

return

Table of contents

Overview

The return statement ends the flow of execution within a function, returning execution to the caller. If the function returns a value to the caller, that value is provided by an expression in the return statement. For example:

fn Sum(Int a, Int b) -> Int {
  return a + b;
}

TODO: Flesh out text (currently just overview)

Relevant proposals