product

Curried calculation of the product of multiplying multiplicand and multiplier.

Usage no npm install needed!

<script type="module">
  import product from 'https://cdn.skypack.dev/product';
</script>

README

product

Curried calculation of the product of multiplying multiplicand and multiplier.

Build Status Code Climate js-standard-style

npm install product --save
npm stats

npm NPM downloads Dependency Status

Examples

require
var product = require('product')
full application
product(10, 2)
//=> 20
partial application
var tenTimes = product(10)
tenTimes(2)
//=> 20
functor
var tenTimes = product(10)
var multipliers = [1, 2, 3, 4, 5]

multipliers.map(tenTimes)
//=> [ 10, 20, 30, 40, 50 ]

API

product(multiplicand, multiplier)

arguments
  • multiplicand: (Number) Number to be multiplied by the multiplier.
  • multiplier: (Number) Number by which the multiplicand is to be multiplied.
returns
  • (Number) The result of multiplying multiplicant and multiplier.

License

GitHub license