Top "Lambda" questions

DO NOT USE FOR THE AWS SERVICE (use [aws-lambda] for those questions!

Java 8 lambda Void argument

Let's say I have the following functional interface in Java 8: interface Action<T, U> { U execute(T t); } …

java lambda java-8 void
Difference between final and effectively final

I'm playing with lambdas in Java 8 and I came across warning local variables referenced from a lambda expression must be …

java lambda inner-classes final java-8
How to sort with a lambda?

sort(mMyClassVector.begin(), mMyClassVector.end(), [](const MyClass & a, const MyClass & b) { return a.mProperty > b.mProperty; }); I'd …

c++ sorting lambda char constants
Group by with multiple columns using lambda

How can I group by with multiple columns using lambda? I saw examples of how to do it using linq …

c# .net entity-framework lambda
C# Pass Lambda Expression as Method Parameter

I have a lambda expression that I'd like to be able to pass around and reuse. Here's the code: public …

c# linq lambda
Using Java 8's Optional with Stream::flatMap

The new Java 8 stream framework and friends make for some very concise java code, but I have come across a …

java lambda java-8 java-stream
Passing capturing lambda as function pointer

Is it possible to pass a lambda function as a function pointer? If so, I must be doing something incorrectly …

c++ c++11 lambda function-pointers
Using GroupBy, Count and Sum in LINQ Lambda Expressions

I have a collection of boxes with the properties weight, volume and owner. I want to use LINQ to get …

linq count lambda group-by sum
Using member variable in lambda capture list inside a member function

The following code compiles with gcc 4.5.1 but not with VS2010 SP1: #include <iostream> #include <vector> #include &…

c++ visual-studio-2010 lambda c++11
Fastest way to Remove Duplicate Value from a list<> by lambda

what is fastest way to remove duplicate values from a list. Assume List<long> longs = new List<…

c# list c#-4.0 lambda generic-list