Skip to content

Instantly share code, notes, and snippets.

@Varriount
Created March 10, 2014 03:17
Show Gist options
  • Save Varriount/9458869 to your computer and use it in GitHub Desktop.
Save Varriount/9458869 to your computer and use it in GitHub Desktop.
Strength of Type
proc testProcOne(x: int): int {.closure.} = return x+5
when isMainModule:
var x: seq[type(testProcOne)] = @[]
x.add(testProcOne)
x.add(testProcOne)
for e in x:
echo(e(4))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment