@monster I use this when I have 2 code paths for ref and value types:
    
    
    proc map*[T; U: not (ref|string|seq)](c: Container[T], f: T -> U): 
Container[U] =
      ...
    
    
    
    proc map*[T; U: ref|string|seq](c: Container[T], f: T -> U): Container[U] =
      ...
    

Note the semicolon `;` in `T;U`. I only had issues with ref type in the 
resulting container (calling the GC), so you can be really flexible.

Reply via email to