Created
March 23, 2018 20:30
-
-
Save narimiran/d684ffd1b8857e4e96887aa7e228147a to your computer and use it in GitHub Desktop.
This file contains 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
proc foo*(x, y: int): seq[int] = | |
runnableExamples: | |
doAssert foo(5, 5) == @[5, 5] | |
doAssert foo(-5, 2) == @[999, 2] | |
result = @[] | |
result.add(x) | |
result.add(y) | |
proc bar*[SomeNumber](a: SomeNumber): SomeNumber = | |
runnableExamples: | |
doAssert bar(5) == 999 | |
10 * a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment