Lambdas in C++

Warning

This is NOT a tutorial. This article contains pointers to some good tutorials.

Videos

Lambdas from First Principles: A Whirlwind Tour of C++

or from youtube

Lambdas from First Principles: A Whirlwind Tour of C++

several interesting puzzles are given in the above video. I’d like to screenshot the puzzles here and the screenshot contains a timestamp of the video. If you are confused about the puzzle, you can know where you can go to check the video.

Simple puzzle to get started

puzzle 1 screenshot

This one below is less confusion and more clear.

Some real stuff regarding lambdas

Sort by the property by using lambdas

Capture by reference

What about templates?

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jimmy Shen

Jimmy Shen

Data Scientist/MLE/SWE @takemobi