implement new loop for constant ranges
implement loop pattern with ranges contain variable
update lib/ and sample/