Skip to content

Modules · Src · Main

View source on GitHub

modules/src/main.fl
module main;
@imports
:: lib::std::containers::algorithms;
i32 main() {
[5]i32 values = [10, 20, 30, 20, 40];
index, found := algorithms::index_of<i32>(values[:], 30);
if found {
stdout("Found at index: ");
stdoutln(index);
return 0;
}
return 1;
}