where method

AgentToolRegistry<C> where(
  1. bool test(
    1. AgentTool<C>
    )
)

The subset of this set test keeps — the only way to derive another presentation's set, and one that can only remove.

Implementation

AgentToolRegistry<C> where(bool Function(AgentTool<C>) test) =>
    AgentToolRegistry([
      for (final tool in tools)
        if (test(tool)) tool,
    ]);