Reading the questions here and here has given me some insight into the situation, and it seems like using the AsEnumerable is memory consuming. Is there a better way to do this LINQ and the way it is ...

I was reading an article on MSDN Magazine about using the Enumerable class in LINQ to generate a random array. The article uses VB.NET and I'm not immediately sure what the equivalent is in C#:
Dim ...

I'm building a widget to show medal counts for the Olympics. I have a collection of "country" objects, where each has a "name" attribute, and "gold", "silver", "bronze" for medal counts.
List should ...

Enumerability is one of the three attributes of a property: writability, enumerability, and configurability. My questions are:
What are the benefit of making properties non-enumerable in JavaScript? ...

I would appreciate it if someone could help me understand the difference between using a Yielder in an Enumerator vs. just invoking yield in an Enumerator.
The "Well-grounded Rubyist" suggests that ...

Enumerable#lazy relies on your enumerable providing an #each method. If your enumerable doesn't have an #each method you can't use #lazy. Now Kernel#enum_for and #to_enum provide the flexibility to ...

Currently I'm reading "The Well-Grounded Rubyist" by David A. Black, and I stuck at 10.9 chapter (Enumerators and the next dimension of enumerability). My question is about yield method.
What is the ...

Before my re-entry in JavaScript (and related) I've done lots of ActionScript 3 and there they had a Dictionary object that had weak keys just like the upcoming WeakMap; but the AS3 version still was ...

I want to emit server-sent events whenever the update action in a controller is called (or whenever my model is updated). I currently have a working watch action in the same controller with a dummy ...

When Enumerable#inject is used, most of the times, we want the result to be the same class (and often the same object) as the initial object that appears as the argument of inject. For example, we use ...

I'm basicly trying to make my class able to iterate using foreach. I read this tutorial. MSDN. It seems very straight forward. However, I have a problem when I want to iterate second time. I debugged ...

I want to take the first "n" entries which pass the block
a = 1..100_000_000 # Basically a long array
# This iterates over the whole array -- no good
b = a.select{|x| x.expensive_operation?}.take(n)
...

This question piggy backs of another question which I raised regarding abusing the IEnumerable interface by modifying an object as you iterate over it.
The general consensus is that no anything that ...