func rep(ls : List+String, n : Integer) -> List+String return reduce(`+', [[]]+[all ls for i in [1..n]]) when ls in List return reduce(`+', [`']+[all ls for i in [1..n]])
rep(`ab' 3) = `ababab' rep([1 2 3] 4) = [1 2 3 1 2 3 1 2 3 1 2 3] rep([1 2 3 4] 0) = [] rep(`abc' -3) = `'