Use Function.iter_range in expr2truthtable