Quick actions

cmd+k|ctrl+k

Navigation

Languages

nested table

Snippet info

Language

Nim

Visibility

unlisted

Author

legacy-anonymous

Created

2018-10-05T05:07:25Z

Updated

2018-10-05T05:07:25Z

import tables

type
  innerTable = Table[string, string]

func newEmptyInnerTable(): Table[string, string] = initTable[string, string]()

var
  nestT = initTable[int, innerTable]()

nestT.mgetOrPut(0, newEmptyInnerTable())["a"] = "b"

echo nestT
INFO