Skip to content

Commit

Permalink
Docs: fix a few typos like lamba -> lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
jamadagni committed Aug 19, 2024
1 parent 8c9e810 commit 9722e28
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/cpp2/declarations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/cpp2/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/cpp2/objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: () = {
Expand Down
2 changes: 1 addition & 1 deletion docs/cpp2/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ All other `#!cpp operator=` functions are explicitly written, either by hand or
### <a id="memberwise-default"></a> 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=`:

Expand Down
2 changes: 1 addition & 1 deletion include/cpp2util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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...
//
//-----------------------------------------------------------------------
//
Expand Down

0 comments on commit 9722e28

Please sign in to comment.