Guest User

seq to array

a guest
May 7th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nim 0.10 KB | None | 0 0
  1. proc toArray(s: seq[int]): array[2, int] =
  2.   assert s.len >= 2
  3.   result[0] = s[0]
  4.   result[1] = s[1]
Advertisement
Add Comment
Please, Sign In to add comment