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

Starling

Estimate resource capacity and actual occupied time from a booking schedule.

Source repository · Package JSON

Use Starling

use vendor::starling::starling;

Run the example

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

fn main() {
    let starts = [0, 2, 4];
    let ends = [4, 5, 7];
    let capacity = 1.0;
    let result = starling_capacity(starts, ends, capacity);
    if len(result) == 0 { println!("invalid"); return; }
    let mut i = 0;
    while i < len(result) {
        println!(at(result, i));
        i += 1;
    }
}

Expected output

7
2
2
1

Published versions

VersionPackageSource commitSHA-256
0.1.0Download ZIPc0385686f2e1c2451524c133d1d1edc35a9e67d57e0357a115b53e0aa890a61cecea890f5c