you can use sets for that.
    
    
    type
      State = enum
        Corona = 0,
        Virus = 1,
    const
      All = {Corona, Virus}
    
    if Corona in All:
      echo "hello"
    proc test(x: set[State]) =
      echo x == All
    var testSet = {Corona}
    testSet.incl Virus
    test(testSet)
    
    
    Run

See also the manual for more information: 
[https://nim-lang.org/docs/manual.html#types-set-type](https://nim-lang.org/docs/manual.html#types-set-type)

Reply via email to