`seq[int] or iterator: int` is a typeclass, not a concrete type. Concrete sum 
types in Nim can be achieved with [object 
variants](https://nim-lang.org/docs/manual.html#types-object-variants) .
    
    
    type
      Curve*[T] = object
        case isIter: bool
        of true:
          cpIter: iterator: T
        else:
          cpSeq: seq[T]
    
    
    Run

Reply via email to