Gohan
1/21/2016 - 4:08 AM

2016-01-21.py

def new_counter(c): 
  counter = itertools.count(c) 
  def f(): 
    return counter.next() 
  return f; 

def new_counter(c): 
  counter = itertools.count(c) 
  return lambda x=0:counter.next()

class new_counter(itertools.count): 
  def __init__(self, *args, **kwargs): 
    super(new_counter, self).__init__(*args, **kwargs) 
  def __call__(self): 
    return self.next() 
```