Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- proc asArray*[A, B, L](t: typedesc[A], list: array[L, B]): array[L, A] =
- for i, e in list: result[i] = A(e)
- const F = asArray(int16, [1, 2, 3, 4, 5])
- echo sizeOf(F[0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement