> For the complete documentation index, see [llms.txt](https://docs.r.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.r.xyz/glider-ide/api/iterables/apiset.md).

# APISet

A `APISet` integrates classic set operations with advanced features. It allows functions to be applied to all elements, enables set refinement using the `filter()` function, and includes a fallback mechanism to ensure default behavior when no transformations or filtering are applied.

### APISet Functionality

A `APISet` supports all classic set operations, such as union (`|`), intersection (`&`), difference (`-`), and symmetric difference (`^`). Additionally, it supports membership tests and other set-based operations. Functions called on the set are applied to every element, resulting in a new APISet with the processed data.

### The `filter()` Function

The `filter()` function uses a predicate to evaluate each element of the `APISet`. Elements where the predicate returns `true` are retained, while others are excluded, allowing precise control over the final set content.

### Flattening

When a function returns another `APISet`, the results are flattened into a single, unified `APISet`. This ensures a consistent set structure, simplifying further processing and analysis

### Functions that return APISet

* instructions.callabes\_recursive()
* instructions.modifiers\_recursive()
* [`instruction.backward_df()`](/glider-ide/api/instruction/instruction.backward_df.md)&#x20;
* [`instruction.forward_df()`](/glider-ide/api/instruction/instruction.forward_df.md)
* [`instruction.next_instructions_recursive()`](/glider-ide/api/instruction/instruction.next_instructions_recursive.md)
* [`instruction.previous_instructions_recursive()`](/glider-ide/api/instruction/instruction.previous_instructions_recursive.md)
* [`instruction.next_instructions()`](/glider-ide/api/instruction/instruction.next_instructions.md)
* [`instruction.previous_instruction()`](/glider-ide/api/instruction/instruction.previous_instruction.md)
* [`instruction.previous_instructions()`](/glider-ide/api/instruction/instruction.previous_instructions.md)
* [`callable.get_reachable_instructions()`](/glider-ide/api/callable/callable.get_reachable_instructions.md)
* point.backward\_df()
* point.backward\_df\_recursive()
* point.forward\_df()
* point.forward\_df\_recursive()
* point.get\_all\_tainted\_paths\_affecting\_point()
* point.get\_tainted\_sources\_affecting\_point()
* value.backward\_df()
* value.backward\_df\_recursive()
* value.forward\_df()
* value.forward\_df\_recursive()&#x20;
* callnode.callees\_recursive()
* callnode.callers\_recursive()
* callable.get\_reachable\_instructions()
* callable.instructions\_recursive()
