feat: basic exercise + functions and mods

This commit is contained in:
2024-11-16 01:45:48 +01:00
parent a84316fd93
commit 2213d38728
4 changed files with 32 additions and 4 deletions

View File

@@ -91,4 +91,12 @@ pub fn functions_module() {
my_point.x += x;
my_point.y += y;
};
// Rust provides higher order functions, such as
// - map : .map(|n| n * n)
// - filter : .filter(|&n| is_add(n))
// - take_while : .take_while(|&n| n < upper)
// Diverging functions
// Never return, marked with: !
}