From c6352ce0ab5fef061b43c8ca960ff7728541b30b Mon Sep 17 00:00:00 2001 From: RAMLAH MUNIR Date: Thu, 14 Aug 2025 19:33:52 +0500 Subject: [PATCH] closes #25084 : docs: fix example for *+ operator (#25102) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Fixed an inconsistency in the Nim manual's example for the `*+` operator. Previously, the example on line 4065 of `doc/manual.md` used variables `a`, `b`, and `c`: ```nim assert `*+`(3, 4, 6) == `+`(`*`(a, b), c) ``` This did not match the preceding call which directly used literals `3`, `4`, `6`. Updated the example to: ```nim assert `*+`(3, 4, 6) == `+`(`*`(3, 4), 6) ``` This change makes the example consistent with the function call and immediately understandable to readers without requiring prior variable definitions. ## Rationale * Improves clarity by avoiding undefined variables in a code snippet. * Matches the example usage in the preceding line. * Helps beginners understand the operator's behavior without additional context. ## Changes * **Edited**: `doc/manual.md` line 4065 — replaced variables `a`, `b`, `c` with literals `3`, `4`, `6`. ## Issue Closes #25084 --- doc/manual.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/manual.md b/doc/manual.md index 9abd0e762c..29006a7536 100644 --- a/doc/manual.md +++ b/doc/manual.md @@ -4062,7 +4062,7 @@ notation. (Thus an operator can have more than two parameters): # Multiply and add result = a * b + c - assert `*+`(3, 4, 6) == `+`(`*`(a, b), c) + assert `*+`(3, 4, 6) == `+`(`*`(3, 4), 6) ```