# APIList

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

### APIList Functionality

A `APIList` supports all classic `list` operation, such as indexing, iteration, and length calculations. Functions called on the list are applied to every element, resulting a new `APIList` with the processed data.

### The `filter()` function

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

### Flattening

When a function return another `APIList`, the results are flattened into a single, one-dimensional `APIList`. This ensures a unified list structure, facilitating easier processing and analysis.

### Functions that return APIList

* callables.exec()
* callable.callee\_values()
* callable.loops()
* [`functions.exec()`](https://glide.gitbook.io/main/glider-ide/api/functions/functions.exec)
* functions.list()
* [`function.properties()`](https://glide.gitbook.io/main/glider-ide/api/function/function.properties)
* modifiers.list()
* [`modifier.exec()`](https://glide.gitbook.io/main/glider-ide/api/modifiers/modifiers.exec)
* modifier.properties()
* instructions.exec()
* instructions.list()
* `instruction.get_dests()`
* [`instruction.next_block()`](https://glide.gitbook.io/main/glider-ide/api/instruction/instruction.next_block)
* [`instruction.next_instruction()`](https://glide.gitbook.io/main/glider-ide/api/instruction/instruction.next_instruction)
* [`instruction.exec()`](https://glide.gitbook.io/main/glider-ide/api/instructions/instructions.exec)
* instruction.get\_components()
* breakinstruction.get\_block\_instructions()
* startassemblyinstruction.get\_block\_instructions()
* tryinstruction.get\_block\_instructions()
* [`call.get_args()`](https://glide.gitbook.io/main/glider-ide/api/value/call/call.get_args)
* [`call.get_call_gas()`](https://glide.gitbook.io/main/glider-ide/api/value/call/call.get_call_gas)
* [`call.get_call_salt()`](https://glide.gitbook.io/main/glider-ide/api/value/call/call.get_call_salt)
* [`call.get_call_value()`](https://glide.gitbook.io/main/glider-ide/api/value/call/call.get_call_value)
* [`value.get_arg_vars()`](https://glide.gitbook.io/main/glider-ide/api/value/value/value.get_arg_vars)
* value.get\_callee\_values()
* [`value.get_global_vars()`](https://glide.gitbook.io/main/glider-ide/api/value/value/value.get_global_vars)
* value.get\_local\_vars()
* [`value.get_state_vars()`](https://glide.gitbook.io/main/glider-ide/api/value/value/value.get_state_vars)
* [`value.get_vars()`](https://glide.gitbook.io/main/glider-ide/api/value/value/value.get_vars)
* tupleexpression.get\_components()
* value.expression.get\_components()
* value.get\_dests()
* varvalue.get\_defining\_points()
* point.df\_reaches\_from\_functions\_arguments()
* point.df\_reaching\_functions\_arguments()
* argumentpoint.list()
* argumentpoint.with\_memory\_type()
* argumentpoint.with\_name()
* argumentpoint.with\_type()
* argumentpoint.with\_type\_convertible()
* globalvariables.list()
* localvariables.list()
* localvariables.with\_memory\_type()
* localvariables.with\_type()
* statevariables.exec()
* statevariables.list()
* callnode.callees()
* callnode.callers()
* contract.get\_contracts\_from\_same\_src\_file()
* contracts().exec()
* enums.exec()
* errors.exec()
* events.exec()
