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

CashLadder

Find closing and lowest balances along an ordered cash-flow schedule.

Source repository · Package JSON

Use CashLadder

use vendor::cashladder::cashladder;

Run the example

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

fn main() {
    let opening = 20.0;
    let flows = [-30, 15];
    let result = cashladder_balance(opening, flows);
    if len(result) == 0 { println!("invalid"); return; }
    let mut i = 0;
    while i < len(result) {
        println!(at(result, i));
        i += 1;
    }
}

Expected output

5
-10
0

Published versions

VersionPackageSource commitSHA-256
0.1.0Download ZIP523332fa199b4f5aaa47e231b6e725eab3b3108d9bad0121b112fa95b5e031dd417cae86e7