All examplesLanguage Install Aner
Types and arithmetic
Explore typed bindings, strings, booleans, comparisons, and numerical expressions.
Download .aner sourcefn main() -> Unit {
let count: Int64 = 7;
let weight = 72.5;
let label: String = "Synthetic sample";
let included: Bool = count > 0 && weight > 0.0;
print(label);
print(count / 3);
print(count % 3);
print(Float64(count) / 2.0);
print(included);
print("sample" == "sample");
}
// Expected output:
// Synthetic sample
// 2
// 1
// 3.5
// true
// true
Make it your experiment.
With Aner installed, save this program as examples/scalars.aner inside a folder for your experiment. Open a terminal in that folder, then check and run the program.
aner check examples/scalars.aner
aner run examples/scalars.anerThe aner command must be on your PATH. Follow the installation guide if your terminal cannot find it.
Iris and Wine are teaching datasets with their own attribution. Example outcomes are not comparative benchmarks or evidence of clinical validity.
Dataset sources & attribution