eclipse / eclipse-collections

Eclipse Collections is a collections framework for Java with optimized data structures and a rich, functional and fluent API.
https://eclipse.dev/collections/
2.42k stars 604 forks source link

Reference Guide: Code blocks chapter calls Function a code block #1499

Open Chealer opened 1 year ago

Chealer commented 1 year ago

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.