diff options
author | Grzegorz Adam Hankiewicz <gradha@imap.cc> | 2013-01-22 20:29:07 +0100 |
---|---|---|
committer | Grzegorz Adam Hankiewicz <gradha@imap.cc> | 2013-01-22 21:41:26 +0100 |
commit | 91700f29e718e41026b536d72b9ff010a4574bf2 (patch) | |
tree | c35bc1437c704f72be04299d0836cb9a3b244327 /tests | |
parent | d0bd5d5cc3407e14ff37590077ec40441be26c84 (diff) | |
download | Nim-91700f29e718e41026b536d72b9ff010a4574bf2.tar.gz |
Renames each proc to map, each is left deprecated.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/compile/tclosure4.nim | 4 | ||||
-rwxr-xr-x | tests/compile/toverprc.nim | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/compile/tclosure4.nim b/tests/compile/tclosure4.nim index 9584fa98a..8e08376b6 100644 --- a/tests/compile/tclosure4.nim +++ b/tests/compile/tclosure4.nim @@ -4,8 +4,8 @@ import json, tables proc run(json_params: TTable) = let json_elems = json_params["files"].elems # These fail compilation. - var files = each(json_elems, proc (x: PJsonNode): string = x.str) - #var files = json_elems.each do (x: PJsonNode) -> string: x.str + var files = map(json_elems, proc (x: PJsonNode): string = x.str) + #var files = json_elems.map do (x: PJsonNode) -> string: x.str echo "Hey!" when isMainModule: diff --git a/tests/compile/toverprc.nim b/tests/compile/toverprc.nim index 43271b684..f3aa66b80 100755 --- a/tests/compile/toverprc.nim +++ b/tests/compile/toverprc.nim @@ -21,7 +21,7 @@ proc takeParseInt(x: proc (y: string): int {.noSideEffect.}): int = result = x("123") echo "Give a list of numbers (separated by spaces): " -var x = stdin.readline.split.each(parseInt).max +var x = stdin.readline.split.map(parseInt).max echo x, " is the maximum!" echo "another number: ", takeParseInt(parseInt) |