Multiply

Multiply( value_1, value_2, ... )
Multiply( value_1, value_2, ... )
Multiply( value_1, value_2, ... )
Multiply( value_1, value_2, ... )
multiply( value_1, value_2, ... )
Multiply( value_1, value_2, ... )

Description

The Multiply function computes the product of a list of numbers. Providing a single number returns the number.

Attempting to call multiply without any arguments results in the error "Non-empty array expected." Check to make sure at least one argument is passed to the multiply function.

Parameters

Argument Type Definition and Requirements

value

List of Numbers

A single value or a list of values.

Returns

A number which is the product of the list of values.

Examples

client.Query(
    Multiply(100, 10)
);
LongV(1000)
result, err := client.Query(
	f.Multiply(100, 10))

if err != nil {
	fmt.Fprintln(os.Stderr, err)
} else {
	fmt.Println(result)
}
1000
System.out.println(
    client.query(
        Multiply(Value(100), Value(10))
    ).get());
1000
client.query(
  q.Multiply(100, 10)
)
.then((ret) => console.log(ret))
.catch((err) => console.error('Error: %s', err))
1000
result = client.query(
  q.multiply(100, 10)
)
print(result)
1000
client.query(Multiply(100, 10))
1000

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!