eclipse-collections icon indicating copy to clipboard operation
eclipse-collections copied to clipboard

Reference Guide: Code blocks chapter calls Function a code block

Open Chealer opened this issue 2 years ago • 0 comments

Section Function in the Code Blocks chapter of the reference guide opens with:

The Function code block in its most common usage takes each element of a collection as the argument to the code-block logic.

The chapter's introduction defines code blocks as objects (instances). Function is an interface, not a code block. I suggest:

An object which implements Function is a code block. In its most...

By the way

I noticed a couple more issues in that chapter.


In the Predicate section above, the first row of the first table claims a predicate...

Evaluates each element of a collection (the argument), and returns a boolean value.

This is not necessarily true. A Predicate is not necessarily used with a filter, and even if it was, not all filters have to treat each element. I suggest:

Tests an object (the argument) and returns a boolean value.


The Function and Procedure types are complex (at least relative to Predicate). They could surely each also use at least 1 example.

Chealer avatar Aug 24 '23 18:08 Chealer