@b3liever post shows you how to dereference a ref, not a seq

i.e. if it wasn't clear
    
    
    proc assignToRef[T](x: T): ref T =
      new result # allocate the ref object, any type works
      result[] = x # assign it x
    
    let y = assignToRef(@[1.0,  2, 3, 4, 5])
    
    
    Run

Reply via email to