diff options
Diffstat (limited to 'alv-lib/math.moon')
| -rw-r--r-- | alv-lib/math.moon | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/alv-lib/math.moon b/alv-lib/math.moon index 33f215c..2cf6e26 100644 --- a/alv-lib/math.moon +++ b/alv-lib/math.moon @@ -291,13 +291,13 @@ also work componentwise with vectors (`num[X]`) and matrices (`num[X][Y]`). All operators are PureOps. (+ 1 2 3) #(<num= 6>) - (+ (array 1 2) (array 3 4)) #(<num[2]= [4 6]>) + (+ [1 2] [3 4]) #(<num[2]= [4 6]>) The arguments for an operator generally have to be of the same type. However it is also okay to pass in scalar numbers together with a different type. The scalars will be repeated as necessary to fit the shape of other arguments: - (* (array (array 1 2) (array 3 4)) + (* [[1 2] [3 4]] 2) #(<num[2][2]= [[2 4] [6 8]]>) |
