mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 09:05:47 +02:00
Added math product
support (#2249)
* added math product: working initial impl * resolving merge conflicts * impl std::ops::Mul for Filesize * rebased with main; refactored product implementation * fixed error msg, added docs for math product
This commit is contained in:
@ -9,6 +9,7 @@ Currently the following functions are implemented:
|
||||
* `math max`: Finds the maximum within a list of numbers or tables
|
||||
* `math median`: Finds the median of a list of numbers or tables
|
||||
* `math sum`: Finds the sum of a list of numbers or tables
|
||||
* `math product`: Finds the product of a list of numbers or tables
|
||||
|
||||
However, the mathematical functions like `min` and `max` are more permissive and also work on `Dates`.
|
||||
|
||||
@ -90,6 +91,11 @@ To get the average of the file sizes in a directory, simply pipe the size column
|
||||
───┴──────────
|
||||
```
|
||||
|
||||
```shell
|
||||
> echo [2 3 3 4] | math product
|
||||
72
|
||||
```
|
||||
|
||||
### Dates
|
||||
|
||||
```shell
|
||||
|
Reference in New Issue
Block a user