diff --git a/mlir/docs/Tutorials/UnderstandingTheIRStructure.md b/mlir/docs/Tutorials/UnderstandingTheIRStructure.md
--- a/mlir/docs/Tutorials/UnderstandingTheIRStructure.md
+++ b/mlir/docs/Tutorials/UnderstandingTheIRStructure.md
@@ -192,7 +192,7 @@
 operations nested inside the function:
 
 ```c++
-  getFunction.walk([](LinalgOp linalgOp) {
+  getFunction().walk([](LinalgOp linalgOp) {
     // process LinalgOp `linalgOp`.
   });
 ```