lazy test for dec called before func added
erat 1) use xrange instead of range; 2) set(chain([], xrange)) instead of set(chain([], set()))