raz / commit c1711418

commit
c1711418f36b710e388d4d942b1defa37e951625
author
Luis <42945842+ldiaz94@users.noreply.github.com>
date
parent
2e82d3d7
The report, for review: return passes several results on

return f(x); returns the several results of f when they are the
procedure's own, the same types in the same order. Report version
2026-10.3, for review before any code.

patch · log

1 file changed, +8 -2

doc/raz.md (history) modified +8 -2

@@ -596,7 +596,9 @@
596596 ### 7.3 Return
597597
598598 `return e;` ends the procedure with the result `e`; `return a, b;` with
599-several results; `return;` from a procedure without results. A
599+several results; `return f(x);` with the several results of `f`, if
600+they are the procedure's own (section 8); `return;` from a procedure
601+without results. A
600602 procedure with results that runs off its end returns zeros, each result
601603 as a variable of its type starts (section 4).
602604
@@ -706,7 +708,9 @@
706708
707709 **Results.** A procedure returns nothing, one value, or several. A call
708710 that returns several values can only stand on the right of a multiple
709-assignment, or alone as a statement.
711+assignment, alone as a statement, or alone after `return` in a
712+procedure whose results are of the same types, in the same order,
713+which then returns them as they are: `return divmod(n, 2);`.
710714
711715 ```
712716 module Divide;
@@ -972,3 +976,5 @@
972976 and signals say where (sections 6.5 and 10).
973977 - **2026-10.2.** `Sys` gains files and directories, the terminal, and
974978 the environment (section 11).
979+- **2026-10.3.** `return f(x);` passes on the several results of `f`
980+ (sections 7.3 and 8).