Skip to content

Instantly share code, notes, and snippets.

@Varriount
Created October 18, 2014 23:49
Show Gist options
  • Save Varriount/58b84ca0bc13ad7afefd to your computer and use it in GitHub Desktop.
Save Varriount/58b84ca0bc13ad7afefd to your computer and use it in GitHub Desktop.
import tables, hashes
type TestEnum = enum
teStart
teMiddle
teEnd
proc hash(d: TestEnum): THash =
return hash(ord(d))
var x = initTable[TestEnum, int](20)
x[teStart] = 50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment