This commit is contained in:
Araq 2014-04-06 22:05:42 +02:00
commit 7c065bfadf
12 changed files with 10 additions and 2 deletions

View file

@ -1,11 +0,0 @@
discard """
output: '''-2'''
"""
proc p(x, y: int; cond: bool): int =
result = if cond: x + y else: x - y
template optP{p(x, y, true)}(x, y: expr): expr = x - y
template optP{p(x, y, false)}(x, y: expr): expr = x + y
echo p(2, 4, true)