Top "Lambda" questions

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

Finding the average of a list

I have to find the average of a list in Python. This is my code so far l = [15, 18, 2, 36, 12, 78, 5, 6, 9] print reduce(…

python list lambda average reduce
Join/Where with LINQ and Lambda

I'm having trouble with a query written in LINQ and Lambda. So far, I'm getting a lot of errors here's …

c# linq join lambda
List comprehension vs. lambda + filter

I happened to find myself having a basic filtering need: I have a list and I have to filter it …

python list functional-programming filter lambda
List<T> OrderBy Alphabetical Order

I'm using C# on Framework 3.5. I'm looking to quickly sort a Generic List<T>. For the sake of …

c# generics list lambda sorting
Java 8 List<V> into Map<K, V>

I want to translate a List of objects into a Map using Java 8's streams and lambdas. This is how …

java lambda java-8 java-stream
Why are Python lambdas useful?

I'm trying to figure out Python lambdas. Is lambda one of those "interesting" language items that in real life should …

python function lambda closures
Is there a way to perform "if" in python's lambda

In python 2.6, I want to do: f = lambda x: if x==2 print x else raise Exception() f(2) #should print "2" f(3) #…

python lambda python-2.6
What is a lambda expression in C++11?

What is a lambda expression in C++11? When would I use one? What class of problem do they solve that …

c++ lambda c++11 c++-faq
Sorting a list using Lambda/Linq to objects

I have the name of the "sort by property" in a string. I will need to use Lambda/Linq to …

c# linq lambda linq-to-objects
Distinct() with lambda?

Right, so I have an enumerable and wish to get distinct values from it. Using System.Linq, there's of course …

c# c#-3.0 lambda extension-methods