revert stdlib changes which are not required anymore

This commit is contained in:
Andreas Rumpf 2020-04-01 14:34:24 +02:00
commit 484548c784
6 changed files with 20 additions and 21 deletions

View file

@ -371,8 +371,9 @@ proc map*[T, S](s: openArray[T], op: proc (x: T): S {.closure.}):
b = map(a, proc(x: int): string = $x)
assert b == @["1", "2", "3", "4"]
result = newSeqOfCap[S](s.len)
for elem in s: result.add op(elem)
newSeq(result, s.len)
for i in 0 ..< s.len:
result[i] = op(s[i])
proc apply*[T](s: var openArray[T], op: proc (x: var T) {.closure.})
{.inline.} =