MultiplicationΒΆ
Note
This page concerns the *
operator on numbers; for the *
operator on types, see pair types; for the *
operator on graphs, see
connect.
All numeric types can be multiplied using the *
operator. For example:
Disco> 2 * 3
6
Disco> (-5) * 2/3
-10/3
In some cases, the *
symbol is not needed: putting two things next
to each other means multiplying them. For example:
Disco> (1 + 2)(3 + 4)
21
Disco> x : N
Disco> x = 5
Disco> 3x
15
The exception is that putting a variable directly on the left of something else is interpreted as function application instead of multiplication.