add method "repeatPrevious" and modify "or"'s parameter

hi, I add a new method repeatPrevious. and I found method or's parameter should has a default value.