diff --git a/1-ProceduralProgramming/4-Functions.ipynb b/1-ProceduralProgramming/4-Functions.ipynb index 9c16178c8b808a90c908fe5547123cbb88752b28..30db878ec0e5e913641b5f699202c02a8fe34e27 100644 --- a/1-ProceduralProgramming/4-Functions.ipynb +++ b/1-ProceduralProgramming/4-Functions.ipynb @@ -1168,17 +1168,9 @@ "source": [ "It is possible to capture everything (in the scope where the lambda is defined) by reference by using `[&]` but it is really ill-advised; don't do this!\n", "\n", - "Lambda functions really shines when you want to use them in a very special context; see below an example using the sort function provided by the standard library, in which for some reasons we want to sort integers but in two blocks: first the odd numbers properly ordered and then the even numbers:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "// Nice Jupyter Xeus-cling feature that doesn't work for the Conda version of cling in macOS.\n", - "?std::sort" + "Lambda functions really shines when you want to use them in a very special context; see below an example using the [`std::sort`](https://en.cppreference.com/w/cpp/algorithm/sort) function provided by the standard library (don't worry about `std::sort` - we will address it later in the notebook dedicated to [algorithms](../5-UsefulConceptsAndSTL/7-Algorithms.ipynb). If you want to know more you may also consult [cppreference](https://en.cppreference.com/w/cpp/algorithm/sort)).\n", + "\n", + "Let's imagine that for some reasons we want to sort integers in a weird fashion: first the odd numbers properly ordered and then the even numbers. We can give this admittedly pointless choice through a lambda:" ] }, {