mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 09:24:36 +00:00
16 lines
268 B
Nim
16 lines
268 B
Nim
import tables
|
|
|
|
type
|
|
TX = Table[string, int]
|
|
|
|
proc foo(models: seq[TX]): seq[int] =
|
|
result = @[]
|
|
for model in models.items:
|
|
result.add model["foobar"]
|
|
|
|
type
|
|
Obj = object
|
|
field: Table[string, string]
|
|
var t: Obj
|
|
discard initTable[type(t.field), string]()
|