Top "Lambda" questions

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

Performance of foreach, array_map with lambda and array_map with static function

What's the performance difference (if there is any) between these three approaches, both used to transform an array to another …

php performance foreach lambda array-map
Java 8: Preferred way to count iterations of a lambda?

I face the same problem often. I need to count the runs of a lambda for use outside the lambda. …

java lambda java-8 java-stream
Zipping streams using JDK8 with lambda (java.util.stream.Streams.zip)

In JDK 8 with lambda b93 there was a class java.util.stream.Streams.zip in b93 which could be used …

lambda functional-programming java-8 lazy-evaluation java-stream
Move capture in lambda

How do I capture by move (also known as rvalue reference) in a C++11 lambda? I am trying to write …

c++ lambda c++11 rvalue-reference
MVC Html.TextBoxFor MaxLength and Value

I am trying to setup a TextBox control in my project using Html.TextBoxFor. However, it only seems to have …

asp.net-mvc-2 model lambda maxlength html.textboxfor
How can I get every nth item from a List<T>?

I'm using .NET 3.5 and would like to be able to obtain every *n*th item from a List. I'm not …

c# linq list lambda
How to map values in a map in Java 8?

Say I have a Map<String, Integer>. Is there an easy way to get a Map<String, …

java map lambda java-8
`break` and `continue` in `forEach` in Kotlin

Kotlin has very nice iterating functions, like forEach or repeat, but I am not able to make the break and …

loops foreach lambda kotlin
Lambda Expression and generic method

Suppose I've a generic interface: interface MyComparable<T extends Comparable<T>> { public int compare(T obj1, …

java generics lambda java-8