Round #882

11 May 2026, 09:57· csharp· Meta-Llama-3.3-70B-Instruct· r15-firing-v3
Complexity
band 0
ZP / UO / OBS
3 / 0 / 2
Journey weight
320
Lightshift ΔL

Prompt

Write an extension method on IEnumerable<T> called 'Chunk(int size)' that yields IEnumerable<T> chunks of the given size. Do not call the built-in Enumerable.Chunk.

Zero-point index (what the engine surfaced)

ZPI-ZPI-0014 | 2026-05-11T09:57:51Z Write an extension method on IEnumerable<T> called 'Chunk(int size)' that yields IEnumerable<T> chunks of the given size. Do not call the built-in Enumerable.Chunk. ZERO POINT — 3 entries (structural invariants) ● hsl(7.18, 100%, 50%) class [feature] ● hsl(0.00, 100%, 50%) public [feature] ● hsl(84.10, 100%, 50%) namespace [feature] UNOBSERVED — 0 entries (implied truths) OBSERVED — 2 entries (explicit in request) ◉ hsl(73.85, 100%, 15%) on [feature] ◉ hsl(113.85, 100%, 15%) int [feature] COMPLEXITY │ 5 entries │ spread: 40° │ band: LOW

Baseline response (no ZPI)

### Chunk Extension Method Here's an implementation of the `Chunk` extension method in C#: ```csharp using System; using System.Collections.Generic; using System.Linq; public static class EnumerableExtensions { /// <summary> /// Splits the source sequence into chunks of the specified size. /// </summary> /// <typeparam name="T">The type of elements in the source sequence.</typeparam> /// <param name="source">The source sequence.</param> /// <param name="size">The size of each chunk.</param> /// <returns>An enumerable sequence of chunks.</returns> public static IEnumerable<IEnumerable<T>> Chunk<T>(this IEnumerable<T> source, int size) { if (source == null) { throw new ArgumentNullException(nameof(source)); } if (size <= 0) { throw new ArgumentOutOfRangeException(nameof(size), "Chunk size must be greater than zero."); } using var enumerator = source.GetEnumerator(); while (enumerator.MoveNext()) { var chunk = new List<T> { enumerator.Current }; for (int i = 1; i < size && enumerator.MoveNext(); i++) { chunk.Add(enumerator.Current); } yield return chunk; } } } ``` ### Example Usage Here's an example of how to use the `Chunk` extension method: ```csharp public class Program { public static void Main() { var numbers = Enumerable.Range(1, 10); var chunks = numbers.Chunk(3); foreach (var chunk in chunks) { Console.WriteLine(string.Join(", ", chunk)); } } } ``` This will output: ``` 1, 2, 3 4, 5, 6 7, 8, 9 10 ``` In this example, the `Chunk` method splits the sequence of numbers into chunks of size 3. The last chunk contains only one element because there are not enough elements to fill a chunk of size 3.

Enhanced response (with ZPI)

```csharp using System; using System.Collections.Generic; using System.Linq; public static class EnumerableExtensions { /// <summary> /// Splits the source sequence into chunks of the specified size. /// </summary> /// <typeparam name="T">The type of elements in the sequence.</typeparam> /// <param name="source">The source sequence.</param> /// <param name="size">The size of each chunk.</param> /// <returns>An enumerable of chunks.</returns> public static IEnumerable<IEnumerable<T>> Chunk<T>(this IEnumerable<T> source, int size) { if (source == null) { throw new ArgumentNullException(nameof(source)); } if (size <= 0) { throw new ArgumentOutOfRangeException(nameof(size), "Chunk size must be greater than zero."); } using var enumerator = source.GetEnumerator(); while (enumerator.MoveNext()) { var chunk = new List<T> { enumerator.Current }; for (int i = 1; i < size && enumerator.MoveNext(); i++) { chunk.Add(enumerator.Current); } yield return chunk; } } } ``` This extension method works by iterating over the source sequence and grouping elements into chunks of the specified size. It uses a `List<T>` to store each chunk and yields it when it's full or when the end of the sequence is reached. The method also includes error checking to ensure that the source sequence and chunk size are valid. Example usage: ```csharp var numbers = Enumerable.Range(1, 10); foreach (var chunk in numbers.Chunk(3)) { Console.WriteLine(string.Join(", ", chunk)); } ```

Grader chain

Each grader reads the same baseline + enhanced pair and casts an independent verdict. Disagreement is the framework's own signal — not noise to be averaged away.

V1samba/Meta-Llama-3.3-70B-Instruct
Same
V4qwen2.5-coder-3b-instruct
Better
V5openrouter/qwen/qwen3-235b-a22b-2507
Same
V7qwen2.5-coder-7b-instruct
Same
V8openai/gpt-4.1
Same
V9anthropic/claude-opus-4-7
Worse
V12openai/gpt-4o
Same

Comments

Our grader said what it said. What do you say? Comment as a guest below.

No comments yet. Be the first to say what you make of this round.

← back to all rounds