Hi,
I'm just digging through your book and found a small mistake in one (or two, because it's twice the same function call) of the printed examples:
var
IsLessThan10: TPredicate<integer>;
begin
IsLessThan10 := function(const aValue: integer): Boolean
begin
Result := aValue < 10;
end;
…
end;
Per definition of the TPredicate type, it accepts no const values. It throws an incompatible Type error
When changing the call to like that it works:
var
IsLessThan10: TPredicate<integer>;
begin
IsLessThan10 := function(aValue: integer): Boolean
begin
Result := aValue < 10;
end;
…
end;
If you're considering to publish an updated version of the book you might consider to change the latter 😄