X-Git-Url: https://git.ralfj.de/rust-101.git/blobdiff_plain/8758d64fa600a64154978b245540e9e0c6af9db1..10d94a73ebbb793c1792886bdedd13799296e847:/src/part01.rs?ds=inline diff --git a/src/part01.rs b/src/part01.rs index fa06a80..95e4593 100644 --- a/src/part01.rs +++ b/src/part01.rs @@ -13,7 +13,7 @@ //@ For example, consider `sqr`: fn sqr(i: i32) -> i32 { i * i } //@ Between the curly braces, we are giving the *expression* that computes the return value. -//@ So we can just write `i * i`, the expression that returns the square if `i`! +//@ So we can just write `i * i`, the expression that returns the square of `i`! //@ This is very close to how mathematicians write down functions (but with more types). // Conditionals are also just expressions. This is comparable to the ternary `? :` operator @@ -106,4 +106,4 @@ pub fn main() { // **Exercise 01.2**: Write a function `vec_print` that takes a vector and prints all its elements. -//@ [index](main.html) | [previous](part00.html) | [raw source](https://www.ralfj.de/git/rust-101.git/blob_plain/HEAD:/workspace/src/part01.rs) | [next](part02.html) +//@ [index](main.html) | [previous](part00.html) | [raw source](workspace/src/part01.rs) | [next](part02.html)