* multimethod

Methods

*(a:Real, b:Real)
Multiplication
*(a:Int, b:Int)
Multiplication
*(arr:Arr, n:Int) Source: stdlib.ngs:2219
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:2229
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:3495
Repeat string n times

Example

"abc" * 3  # "abcabcabc"
*(cb:Fun, n:Int) Source: stdlib.ngs:5906
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