def mult(p, n):
np = P()<EOL>while n >= <NUM_LIT:1>:<EOL><INDENT>if n % <NUM_LIT:2>:<EOL><INDENT>np = np + p<EOL><DEDENT>p = p + p<EOL>n = n // <NUM_LIT:2><EOL><DEDENT>return np<EOL>
Returns a Pattern that matches exactly n repetitions of Pattern p.