how to get a 'mixed bag seq' in Nim. I probably need to learn about generics...

In Crystal: 
    
    
    mixed_bag_seq = [1, "aa"]
    
    
    Run

here is Nim example that fails: 
    
    
    proc foo(a: int|string): int|string  =  # works: both string and int 
accepted
      discard
    
    type
      mixed_seq = object
        member1: seq[string]      # works
        # member2: seq[int|string]  # Error: 'int or string' is not a concrete 
type
    
    var bar: mixed_seq
    
    
    Run

Reply via email to