* multimethod

Methods

*(a:Real, b:Real)
Multiplication
*(a:Int, b:Int)
Multiplication
*(arr:Arr, n:Int) Source: stdlib.ngs:3062
Repeat all elements in arr n times

Parameters

arrElements to repeat
nNumber of times to repeat the elements

Returns

Arr

Example

[10,20] * 2  # [10,20,10,20]
*(a:Arr, b:Arr) Source: stdlib.ngs:3072
Cartesian product

Returns

Arr of Arr[2]

Example

[10,20] * [30,40]  # [[10, 30], [10, 40], [20, 30], [20, 40]]
*(s:Str, n:Int) Source: stdlib.ngs:4474
Repeat string n times

Example

"abc" * 3  # "abcabcabc"
*(cb:Fun, n:Int) Source: stdlib.ngs:7244
Call cb n times without any parameters and accumulate the results.

Example

a = Box * 2; a[0] is Box and a[1] is Box and a[0] !== a[1]  # true