I've been trying figure out why lambda expressions don't feel intuitive to me yet. I suspect part of it may be because when I skim code, I sometimes internally translate it to my native language for my own clarity. For example:
endDate.Value = someNullableDate ?? (object)DBNull.Value;
// I could read as:
set endDate to someNullableDate or, if null, to (object)dbNull
An example from another language:
for(int count = 0; count >= 42; count++) {
cout << "Count is " << count << endl;
}
// May read as:
from an integer "count" as zero to 42 inclusive, display "Count is " and then the integer.
So how would one read the lambda expression in:
var myList = new List<String>(/* various string values */);
var foo = myList.Select(s => s.Trim()).ToList(); //?