Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 HashSet 类型的 nim-lang 但收到错误
var list = initSet\[int]()
错误是
Error: undeclared identifier: 'initSet'
我已经导入了哈希库
它在sets模块中,而不是hashes。
import sets proc sum(xs: HashSet[int]): int = for x in xs: result += x var list = initSet[int]() list.incl(10) list.incl(20) list.incl(30) echo list.sum