Bob Nystrom
b301e9f119
feat: implement eager * operator for String and List to repeat content by integer count
...
Add `*(count)` method to both String and List classes in wren_core.wren, enabling eager repetition of string characters or list elements. The operator validates that count is a non-negative integer, aborting with a clear error message otherwise. For strings, concatenates the original string count times; for lists, builds a new list by adding all elements count times. Includes comprehensive test cases for normal, zero, and edge-case inputs, plus error tests for negative, non-integer, and non-numeric counts. Also refactors existing list plus tests to use inline expressions and adds a plus_not_iterable error test.
2016-02-24 15:48:03 +00:00
..
2015-09-15 14:46:09 +00:00
2015-09-15 14:46:09 +00:00
2015-09-15 14:46:09 +00:00
2015-09-15 14:46:09 +00:00
2015-09-15 14:46:09 +00:00
2015-03-14 13:17:21 +00:00
2015-09-15 14:46:09 +00:00
2015-09-15 14:46:09 +00:00
2015-09-15 14:46:09 +00:00
2015-03-28 19:35:20 +00:00
2015-09-15 14:46:09 +00:00
2015-03-15 21:51:24 +00:00
2015-03-15 21:51:24 +00:00
2015-03-15 21:51:24 +00:00
2015-03-15 21:51:24 +00:00
2015-09-15 14:46:09 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-09-15 14:46:09 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-09-15 14:46:09 +00:00
2015-03-14 19:45:56 +00:00
2015-09-16 14:15:48 +00:00
2015-09-15 14:46:09 +00:00
2016-02-24 15:48:03 +00:00
2016-02-24 15:48:03 +00:00
2016-02-24 15:48:03 +00:00
2016-02-24 15:48:03 +00:00
2015-09-15 14:46:09 +00:00
2015-09-15 14:46:09 +00:00
2016-02-24 15:48:03 +00:00
2016-02-24 15:48:03 +00:00
2015-03-14 19:45:56 +00:00
2015-09-15 14:46:09 +00:00
2015-03-14 19:45:56 +00:00
2015-09-15 14:46:09 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-09-15 14:46:09 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-12-06 18:37:58 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-09-15 14:46:09 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-09-15 14:46:09 +00:00
2015-09-15 14:46:09 +00:00
2015-09-15 14:46:09 +00:00
2015-09-15 14:46:09 +00:00