Added test for code in @def-'s comment in #1502.
This commit is contained in:
parent
23cebff5fc
commit
a395182dd7
1 changed files with 6 additions and 0 deletions
6
tests/closure/tissue1502def.nim
Normal file
6
tests/closure/tissue1502def.nim
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
import sequtils
|
||||||
|
let xs: seq[tuple[key: string, val: seq[string]]] = @[("foo", @["bar"])]
|
||||||
|
|
||||||
|
let maps = xs.map(
|
||||||
|
proc(x: auto): tuple[typ: string, maps: seq[string]] =
|
||||||
|
(x.key, x.val.map(proc(x: string): string = x)))
|
||||||
Loading…
Add table
Add a link
Reference in a new issue