hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 28ee2ae5b2e9259a718399e2b25d888fe52c0be0
parent e21766777dfbe21b88f913de04268419a5ee21bd
Author: Bor Grošelj Simić <bor.groseljsimic@telemach.net>
Date:   Wed, 24 Feb 2021 00:55:57 +0100

strings/iter.ha: rename iter_reverse to riter

Diffstat:
Mstrings/iter.ha | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/strings/iter.ha b/strings/iter.ha @@ -13,7 +13,7 @@ export fn iter(src: str) iterator = iterator { }; // Initializes a string iterator, starting at the end of the string. -export fn iter_reverse(src: str) iterator = { +export fn riter(src: str) iterator = { let ret = iterator { dec = utf8::decode(src), push = void, @@ -91,7 +91,7 @@ export fn iter_str(iter: *iterator) str = { assert(next(&s) as rune == 'q'); assert(prev(&s) as rune == 'は'); - s = iter_reverse("にちは"); + s = riter("にちは"); const expected3 = ['は', 'ち', 'に']; for (let i = 0z; i< len(expected3); i += 1) { match (prev(&s)) {