update syntax sugar of loop-patterns #4
fix type (pull req)