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

Installment Piece

Distribute minor units across equal installments, assigning one extra unit to each earliest installment until the remainder is exhausted.

Source repository · Package JSON

Use Installment Piece

use vendor::installment_piece::installment_piece;

Run the example

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

fn main() {
    println!(installment_piece(10,3,0));
}

Expected output

4

Published versions

VersionPackageSource commitSHA-256
0.1.1Download ZIP · Browse filese6196d72dd29d50fe2fbed770c254c1eb20e31fe6e36be1894ea7ed618ab249802d2c782b4
0.1.0Download ZIP · Browse files6349f237849c39f652bdd35f38640ca40c4102d74e2f98fbfed31f9ac772477e0a6272f652