diff --git a/content/blog/2014-08-12-option-monads-in-rust/index.md b/content/blog/2014-08-12-option-monads-in-rust/index.md index 8abf19d78..01db3985d 100644 --- a/content/blog/2014-08-12-option-monads-in-rust/index.md +++ b/content/blog/2014-08-12-option-monads-in-rust/index.md @@ -137,13 +137,13 @@ Let's see what the same code would look like using the `Option` monad. In this e fn main () { let number: f64 = 20.; // Perform a pipeline of options. - let result = Some(number) - .map(inverse) // Described below. + Some(number) .map(double) - .map(inverse) + .map(inverse) // Described below. .and_then(log) // Described below. .map(square) - .and_then(sqrt); + .map(inverse) + .and_then(sqrt); // Extract the result. match result { Some(x) => println!("Result was {}.", x),