proc test(y: int): int = var x = 5 try: result = x + y return result = result * 2 finally: result -= 5 echo test(3)