Skip to content

Instantly share code, notes, and snippets.

@flaviut
Last active August 29, 2015 14:04
Show Gist options
  • Save flaviut/a28bba00b3992edbc754 to your computer and use it in GitHub Desktop.
Save flaviut/a28bba00b3992edbc754 to your computer and use it in GitHub Desktop.
proc array[I, OT, NT](arr: array[I, OT]): array[I, NT] =
for i, v in arr:
result[i] = NT(i)
let a = array[0..1, int, float]([1, 2])
echo(repr(a))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment