The book is Algorithms from Sedgewick.

In Java I just create an array with a certain size and when it's full I create 
another one with double the size and copy the elements to it. I'm doing it 
wrong? I'm just following the book.

In Nim I couldn't do it. I looked at the source code on github and all I found 
was: 
    
    
    seq*{.magic: "Seq".}[T]
    

newSeq also has a signature like that and no implementation 
    
    
    proc newSeq*[T](s: var seq[T], len: Natural) {.magic: "NewSeq", 
noSideEffect.}
    

Reply via email to