File size: 202 Bytes
afcfd4d
 
 
 
 
 
 
 
ac9f14b
afcfd4d
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
def parser_func(x):
    if x > 0:
        return x * 2
    return -x

class Parser:
    def __init__(self):
        self.count = 0

    def step(self):
        self.count += 1
        return self.count