revert stdlib changes which are not required anymore
This commit is contained in:
parent
66f18037b3
commit
484548c784
6 changed files with 20 additions and 21 deletions
|
|
@ -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.} =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue