Blyx Nest Blyx language
Registry / Library
library · v0.1.0

RunDuration

Find the critical-path time in a forest of dependent tasks.

Source repository · Package JSON

Use RunDuration

use vendor::runduration::runduration;

Run the example

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

fn main() {
    let parents = [-1, 0, 0, 2];
    let durations = [1, 3, 2, 5];
    let result = runduration_path(parents, durations);
    if len(result) == 0 { println!("invalid"); return; }
    let mut i = 0;
    while i < len(result) {
        println!(at(result, i));
        i += 1;
    }
}

Expected output

8
3
11

Published versions

VersionPackageSource commitSHA-256
0.1.0Download ZIP104c82789e7a83c8d42d2e8b36cbc39a075153a5ec38aa05722638c9b40fa96a3e5a0eb006