repeat

repeat value the given number of times and return new one


Parameters

repeat value :literal :any
       times :integer

Returns

  • :string
  • :block

Examples

copy
print repeat "hello" 3 ; hellohellohello

copy
repeat [1 2 3] 3 ; => [1 2 3 1 2 3 1 2 3]

copy
repeat 5 3 ; => [5 5 5]

copy
repeat [[1 2 3]] 3 ; => [[1 2 3] [1 2 3] [1 2 3]]

Related