Pass the sequence to `shallow()` before processing or create a custom object
    
    
    type MyShallowSeq[T] {.shallow.} = object
      buffer: seq[T]
    
    
    Run

Your solution will create 2 pointer indirections, it's idiomatic but slower.

Reply via email to