Care to explain the last one? The presentation is weird and stupid, but I don't see any obvious (technical) issue other than the missing bracket on the left, unlike the first two
Iterative example doesn't iterate, mismatches parentheses and brackets. Because of this, the iterative example is shorter and simpler than the "short & simple" lambda example.
Lambda example is to the best of my parsing ability this:
It's interesting to see how LLMs make mistakes sometimes: replacing `->` with `-λ` because arrow sort-of has the same meaning as lambdas in lambda calculus. It's like an LLM brain fart replacing something semantically similar but nonsensical in context.
The 'long' code for checking apples is shorter, but it's missing the external for loop. So I guess you could say it's not (ahem) an apples to apples comparison.
- the apples example on the right side ("Short code") ist significantly longer than the equivalent "Long code" example on the left side (which might also be because that code example omits the necessary for loop).
- The headings don't provide structure. "Checking Each Apple" and "Only Red Apples!" sounds like opposites, but the code does more or less the same in both cases.