Blyx Nest Blyx language
Registry / Framework
framework · v0.1.1

Ibis

Reconcile an invoice with split payments in integer minor units.

Source repository · Package JSON

Use Ibis

use vendor::ibis::ibis;

Run the example

nest demo ibis@0.1.1
blyxc native-run ibis-demo/main.blyx
Example source and expected output
use vendor::ibis::ibis;

fn main() {
    let units = [2, 1];
    let prices = [125, 50];
    let payments = [200, 125];
    let result = ibis_reconcile(units, prices, payments);
    if len(result) == 0 { println!("invalid"); return; }
    let mut i = 0;
    while i < len(result) {
        println!(at(result, i));
        i += 1;
    }
}

Expected output

300
300
0
25

Published versions

VersionPackageSource commitSHA-256
0.1.1Download ZIPe007a949551fe36141192142a8ab644f693c774f4f4f5edc219894e559461419021290fd82