From 85298ce8bf9ce54da5d0918c9267e59431acd3ee Mon Sep 17 00:00:00 2001 From: mryouse Date: Fri, 29 Jul 2022 20:04:52 +0000 Subject: for-count now uses _idx_ instead of idx --- libs/regex.neb | 2 +- libs/sort.neb | 2 +- neb/std/core.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/regex.neb b/libs/regex.neb index af36830..33e2b55 100644 --- a/libs/regex.neb +++ b/libs/regex.neb @@ -44,7 +44,7 @@ (block (def seed (list)) (for-count (length text) - (redef seed (append seed idx))) + (redef seed (append seed _idx_))) (not (empty? (drop-while seed (not (.match-inner pattern (join (slice (split text) _item_) ""))))))))) diff --git a/libs/sort.neb b/libs/sort.neb index 27779b1..c163730 100644 --- a/libs/sort.neb +++ b/libs/sort.neb @@ -194,7 +194,7 @@ (def b (rest lst)) (def acc (list)) (for-count (length a) - (append acc idx)) + (append acc _idx_)) (empty? (drop-while acc (cmp (slice a _item_ 1) diff --git a/neb/std/core.py b/neb/std/core.py index 60c1161..984fa87 100644 --- a/neb/std/core.py +++ b/neb/std/core.py @@ -49,7 +49,7 @@ def interpretForCount(symbol, args, env, ns): new_env = Environment(env) ret = None for idx in range(0, num.value): - new_env.register("idx", Int(idx + 1)) + new_env.register("_idx_", Int(idx + 1)) for arg in args[1:]: ret = evaluate(arg, new_env, ns) if ret is None: -- cgit v1.2.3