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

Pipit

Plan the next CLI batch from child exit codes and a failure allowance.

Source repository · Package JSON

Use Pipit

use vendor::pipit::pipit;

Run the example

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

fn main() {
    let codes = [0, 3, 0];
    let total = 8.0;
    let batch = 2.0;
    let tolerance = 1.0;
    let result = pipit_continue_batch(codes, total, batch, tolerance);
    if len(result) == 0 { println!("invalid"); return; }
    let mut i = 0;
    while i < len(result) {
        println!(at(result, i));
        i += 1;
    }
}

Expected output

3
2
1
3

Published versions

VersionPackageSource commitSHA-256
0.1.0Download ZIP7cbc6b99fa7594408d8881d1306ba591276cb31454fa56c4fe5be05efbf6d7cc58c8a98e85