Skip to content

Commit 4c35e9c

Browse files
committed
Minor fixes and adding links
1 parent 3cd71a7 commit 4c35e9c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lectures/lambdas.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Lambdas
1717
- [Summary](#summary)
1818

1919

20-
We've already covered so many topics in this course but there is one more thing that firmly belongs to modern C++ that we did not really touch upon - **lambdas**.
20+
We've already covered so many topics in this course but there is one more thing that firmly belongs to modern C++ that we did not really touch upon - [**lambdas**](https://en.cppreference.com/w/cpp/language/lambda).
2121

2222
Here's one example for which they are useful. Imagine we have a list of people, represented as a struct `Person`, and we would like to sort them by age. We can try using the standard [`std::sort`](https://en.cppreference.com/w/cpp/algorithm/sort) function for that:
2323
<!--
@@ -268,6 +268,7 @@ Note that we can also drop the `&` in the `std::sort` call and the code will do
268268
<!--
269269
`CPP_SETUP_START`
270270
#include <vector>
271+
#include <algorithm>
271272
bool less(int a, int b) { return a < b;}
272273
int main() {
273274
std::vector<int> people{1, 2, 3};

0 commit comments

Comments
 (0)