From 9722e28fdbd41a999f1123edb9306c5e3e1e4c27 Mon Sep 17 00:00:00 2001 From: Shriramana Sharma Date: Mon, 19 Aug 2024 22:55:30 +0530 Subject: [PATCH] Docs: fix a few typos like lamba -> lambda --- docs/cpp2/declarations.md | 2 +- docs/cpp2/functions.md | 2 +- docs/cpp2/objects.md | 2 +- docs/cpp2/types.md | 2 +- include/cpp2util.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/cpp2/declarations.md b/docs/cpp2/declarations.md index cbb553af6..3f4fcc54b 100644 --- a/docs/cpp2/declarations.md +++ b/docs/cpp2/declarations.md @@ -48,7 +48,7 @@ We can illustrate this in two directions. First, let's start with a full functio f:(x: int = init) = { /*...*/ } // x is a parameter to the function f:(x: int = init) = statement; // same, { } is implicit -// Omit name => anonymous function (aka 'lamba') +// Omit name => anonymous function (aka 'lambda') :(x: int = init) = { /*...*/ } // x is a parameter to the function :(x: int = init) = statement; // same, { } is implicit diff --git a/docs/cpp2/functions.md b/docs/cpp2/functions.md index 525ccc192..a67624e01 100644 --- a/docs/cpp2/functions.md +++ b/docs/cpp2/functions.md @@ -451,7 +451,7 @@ Next, `#!cpp -> _ =` (deduced return type) is the default for single-expression equals: (a, b) a == b; ``` -Finally, at expression scope (aka "lamba/temporary") functions/objects aren't named, and the trailing `;` is optional: +Finally, at expression scope (aka "lambda/temporary") functions/objects aren't named, and the trailing `;` is optional: ``` cpp title="(not) 'equals': Identical meaning, but without a name as an unnamed function at expression scope" :(a, b) a == b diff --git a/docs/cpp2/objects.md b/docs/cpp2/objects.md index 7b0b84a5e..11f7ee59f 100644 --- a/docs/cpp2/objects.md +++ b/docs/cpp2/objects.md @@ -79,7 +79,7 @@ f: () = { // ... no uses of buf here ... buf = some_calculated_value; // constructs (not assigns) buf // ... - std::cout buf[0]; // ok, a has been initialized + std::cout << buf[0]; // ok, a has been initialized } g: () = { diff --git a/docs/cpp2/types.md b/docs/cpp2/types.md index e3456e8a7..e8f1bd7dd 100644 --- a/docs/cpp2/types.md +++ b/docs/cpp2/types.md @@ -180,7 +180,7 @@ All other `#!cpp operator=` functions are explicitly written, either by hand or ### Memberwise by default -All copy/move/comparison `#!cpp operator=` functions are memberwise by default in Cpp2. That includes when you write memberwise construction and assignment yourself. +All copy/move/conversion `#!cpp operator=` functions are memberwise by default in Cpp2. That includes when you write memberwise construction and assignment yourself. In a hand-written `#!cpp operator=`: diff --git a/include/cpp2util.h b/include/cpp2util.h index 144aed7cd..460a4234b 100644 --- a/include/cpp2util.h +++ b/include/cpp2util.h @@ -1309,7 +1309,7 @@ class out { //----------------------------------------------------------------------- // -// CPP2_UFCS: Variadic macro generating a variadic lamba, oh my... +// CPP2_UFCS: Variadic macro generating a variadic lambda, oh my... // //----------------------------------------------------------------------- //