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.
Nim-lang の HashSet タイプを使用しようとしていますが、エラーが発生します
var list = initSet\[int]()
エラーは
Error: undeclared identifier: 'initSet'
すでにハッシュ ライブラリをインポートしています
hashではなく、setsモジュールにあります。
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