Skip to content

Instantly share code, notes, and snippets.

@Varriount
Created July 8, 2018 02:21
Show Gist options
  • Save Varriount/ae5aab05a8771cdd155fe0ae3282f19a to your computer and use it in GitHub Desktop.
Save Varriount/ae5aab05a8771cdd155fe0ae3282f19a to your computer and use it in GitHub Desktop.
proc sequenceAssign[T](to: var seq[T], from: seq[T]) =
to = newSeq(len(from))
for index in 0..high(to):
memcopy(addr to[index], addr from[index], sizeof(T))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment