From e44f6ec3b6d06b622e222f17e21f752db74d187f Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Sun, 17 May 2026 11:37:43 +0100 Subject: [PATCH] fix(stdlib): rename `as` param/var -> `xs` in collections (#135 slice 6b) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #135 slice 6b — keyword-as-identifier (sibling of slice 6). `zip` and `unzip` in collections.affine used `as` as a parameter/variable name; `as` is the AS keyword (cast/import-alias), so it could not parse in binding position. Renamed `as` -> `xs` (the `bs` companion is not a keyword, left as-is). Pure stdlib rename — zero grammar/compiler change, zero risk. Effect: collections.affine clears its last parse wall (was PARSE 40:13) and advances to RESOLVE (module-resolution, slice 8 class). Suite unaffected (stdlib-only). Advances #135. Refs #128, #135. Co-Authored-By: Claude Opus 4.7 (1M context) --- stdlib/collections.affine | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/stdlib/collections.affine b/stdlib/collections.affine index 1d80e16c..10062528 100644 --- a/stdlib/collections.affine +++ b/stdlib/collections.affine @@ -37,23 +37,23 @@ fn drop(n: Int, list: [T]) -> [T] { } /// Zip two lists together -fn zip(as: [A], bs: [B]) -> [(A, B)] { - if len(as) == 0 || len(bs) == 0 { +fn zip(xs: [A], bs: [B]) -> [(A, B)] { + if len(xs) == 0 || len(bs) == 0 { [] } else { - [(as[0], bs[0])] ++ zip(as[1:], bs[1:]) + [(xs[0], bs[0])] ++ zip(xs[1:], bs[1:]) } } /// Unzip a list of pairs fn unzip(pairs: [(A, B)]) -> ([A], [B]) { - let as = []; + let xs = []; let bs = []; for (a, b) in pairs { - as = as ++ [a]; + xs = xs ++ [a]; bs = bs ++ [b]; } - (as, bs) + (xs, bs) } /// Find first element matching predicate