Skip to content

Instantly share code, notes, and snippets.

@zah
Last active August 29, 2015 14:12
Show Gist options
  • Save zah/bcee4e7cb59dbd0b2d16 to your computer and use it in GitHub Desktop.
Save zah/bcee4e7cb59dbd0b2d16 to your computer and use it in GitHub Desktop.
type
Matrix[Rows, Cols: static[int]; E] = generic M
M.T is T
Rows == M.M
Cols == M.N
m[range[0..(R - 1)], range[0..(C - 1)]] is T
proc foo(m: Matrix) =
echo Matrix.M, m.N
let x = Matrix.E()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment