Registry / Library

library · v0.1.0
GridGap
Locate the coarsest gap and count nonincreasing steps in a sample grid.
Use GridGap
use vendor::gridgap::gridgap;
Run the example
nest demo gridgap@0.1.0
blyxc native-run gridgap-demo/main.blyx
Example source and expected output
use vendor::gridgap::gridgap;
fn main() {
let x = [0, 1, 4, 3];
let result = gridgap_inspect(x);
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
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.0 | Download ZIP | 7d010c19b9 | b7b249f68527aa0d0dd38227366fd8659d6b4ec1cfc88e2dac886b8e5a938286 |