Skip to content

Instantly share code, notes, and snippets.

@flaviut
Created July 29, 2014 22:22
Show Gist options
  • Save flaviut/7aab80daa9e13fcac456 to your computer and use it in GitHub Desktop.
Save flaviut/7aab80daa9e13fcac456 to your computer and use it in GitHub Desktop.
type FArray* {.unchecked.} [T] = array[0..0, T]
converter array2FArray[I, T](arr: array[I, T]): FArray[T] =
var arr = arr
return cast[FArray[T]](addr arr)
let x: FArray[int] = [1,2,3,4,5]
echo(x[5])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment