txt: ## return.md
  return
  
  Combined from primary sources listed below.
  
  # [In Control flow](#___top "go to top of document")[§](#(Control_flow)_return_return "direct link")
  
  See primary documentation
  [in context](/language/control#return)
  for **return**.
  
  The sub `return` will stop execution of a subroutine or method, run all relevant [phasers](/language/phasers#Block_phasers) and provide the given return value to the caller. The default return value is [`Nil`](/type/Nil). If a return [type constraint](/language/signatures#Constraining_return_types) is provided it will be checked unless the return value is [`Nil`](/type/Nil). If the type check fails the exception [`X::TypeCheck::Return`](/type/X/TypeCheck/Return) is thrown. If it passes a control exception is raised and can be caught with [CONTROL](/language/phasers#CONTROL).
  
  Any `return` in a block is tied to the first [`Routine`](/type/Routine) in the outer lexical scope of that block, no matter how deeply nested. Please note that a `return` in the root of a package will fail at runtime. A `return` in a block that is evaluated lazily (e.g. inside `map`) may find the outer lexical routine gone by the time the block is executed. In almost any case `last` is the better alternative. Please check [the functions documentation](/language/functions#Return_values) for more information on how return values are handled and produced.
  