Refactor splits/2 using foreach syntax (remove private filter _nwise) (#3260)
This commit refactors `splits/2` implementation using `foreach` syntax and reduces intermediate arrays. This refactoring removes an unnecessary private (and undocumented) filter `_nwise` and closes #3148.
This commit is contained in:
1 parent
96d19ca2ee
commit
b088e83a82
5 files changed
+37
-21
No files matched your search
@@ -2736,6 +2736,9 @@ sections:
|
||||
- program: 'splits(", *")'
|
||||
input: '"ab,cd, ef, gh"'
|
||||
output: ['"ab"','"cd"','"ef"','"gh"']
|
||||
- program: 'splits(",? *"; "n")'
|
||||
input: '"ab,cd ef, gh"'
|
||||
output: ['"ab"','"cd"','"ef"','"gh"']
|
||||
|
||||
- title: "`sub(regex; tostring)`, `sub(regex; tostring; flags)`"
|
||||
body: |
|
||||
|
||||
Reference in new issue
Block a user