Last active
April 18, 2023 16:55
-
-
Save hugosenari/f8302053e93df144cd14fe856ae75a4b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type | |
| MySeq*[T] = object | |
| data: ptr UncheckedArray[T] | |
| proc createSeq*[T](elems: varargs[T]): MySeq[T] = | |
| result.data = cast[typeof(result.data)](alloc(elems.len * sizeof(T))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment