X-Git-Url: https://git.ralfj.de/rust-101.git/blobdiff_plain/231a88af0700e47c79f2e900323792ec91c41530..2593cdbf30508a412682ed0e04e9d3a58fb69c15:/src/part00.rs diff --git a/src/part00.rs b/src/part00.rs index 73fe8c1..b887eb4 100644 --- a/src/part00.rs +++ b/src/part00.rs @@ -3,6 +3,13 @@ // Rust-101, Part 00 // ================= +// As a starter, we want to write a function that computes the minimum of a list. +// First, we need to get a list. For now, let's just hard-code some sample list. +// Later, we will ask the user to input a list. +// +// Observe how in Rust, the function type comes *after* the arguments (which, in +// this case, the function does not have). `Vec` is the type of a growable list +// of (signed, 32-bit) integers. pub fn read_vec() -> Vec { vec![0,1,2,3,4]