Created
June 3, 2016 18:11
-
-
Save Araq/874f689a22fa2375ffee9335a0ac32d0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| template ov1(a: int; b: untyped; s1: untyped) = | |
| let b = 10 | |
| if a != 0: | |
| s1 | |
| template ov1(a: int; b: untyped; s1, s2: untyped) = | |
| let b = 11 | |
| if a != 0: | |
| s1 | |
| else: | |
| s2 | |
| proc gen[T](x: T) = | |
| ov1(0, foobar) do: | |
| echo foobar | |
| do: | |
| echo foobar+10 | |
| gen(20) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment