From 1e8aa45176a3bcd83bcaddd1fa8e1251d48cdbc9 Mon Sep 17 00:00:00 2001 From: Lawrence Bethlenfalvy Date: Fri, 27 May 2022 22:25:27 +0200 Subject: [PATCH] Fixed auto section --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 034f194..3781334 100644 --- a/README.md +++ b/README.md @@ -89,11 +89,12 @@ and `isub` are self explanatory. ## Auto parameters (generics, polymorphism) Although I didin't specify the type of `i` in the above example, it is -known at compile time because the recursion is applied to b which is an -integer. I could have omitted the second argument but then I would have +known at compile time because the recursion is applied to `a` which is an +integer. I could have omitted the second argument, then I would have had to specify `i`'s type as an integer, because for plain lambda -expressions all types have to be statically knoqn at compile time. To -achieve polymorphism, one parametric tool is available, called auto +expressions all types have to be statically known at compile time. + +Polymorphism is achieved using parametric constructs called auto parameters. An auto parameter is a placeholder filled in during compilation, syntactically remarkably similar to lambda expressions: