Registry / Library

library · v0.1.1
LineAmount
Extend paired invoice quantities and prices in integer minor units.
Use LineAmount
use vendor::lineamount::lineamount;
Run the example
nest demo lineamount@0.1.1
blyxc native-run lineamount-demo/main.blyx
Example source and expected output
use vendor::lineamount::lineamount;
fn main() {
let units = [2, 3];
let prices = [100, 50];
let result = lineamount_subtotal(units, prices);
if len(result) == 0 { println!("invalid"); return; }
let mut i = 0;
while i < len(result) {
println!(at(result, i));
i += 1;
}
}
Expected output
350
2
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.1 | Download ZIP | f9d4b2962c | c9524ba1ae71330613b41beb3432365282edab76e8f945271f3d11d81779ac18 |