Power set: Difference between revisions

Content added Content deleted
m (→‎{{header|Ring}}: Remove vanity tags)
m (Error: typeless parameters are obsolete in current Nim)
Line 2,085: Line 2,085:
<lang nim>import sets, hashes
<lang nim>import sets, hashes


proc hash(x): THash =
proc hash(x: HashSet[int]): Hash =
var h = 0
var h = 0
for i in x: h = h !& hash(i)
for i in x: h = h !& hash(i)