mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-14 17:47:57 -05:00
Restructuring the Repo to make it clear the difference between classic autogpt and the autogpt platform: * Move the "classic" projects `autogpt`, `forge`, `frontend`, and `benchmark` into a `classic` folder * Also rename `autogpt` to `original_autogpt` for absolute clarity * Rename `rnd/` to `autogpt_platform/` * `rnd/autogpt_builder` -> `autogpt_platform/frontend` * `rnd/autogpt_server` -> `autogpt_platform/backend` * Adjust any paths accordingly
21 lines
314 B
Dart
21 lines
314 B
Dart
class Stack<T> {
|
|
final List<T> _list = [];
|
|
|
|
void push(T element) {
|
|
_list.add(element);
|
|
}
|
|
|
|
T pop() {
|
|
var element = _list.last;
|
|
_list.removeLast();
|
|
return element;
|
|
}
|
|
|
|
T peek() {
|
|
return _list.last;
|
|
}
|
|
|
|
bool get isEmpty => _list.isEmpty;
|
|
bool get isNotEmpty => _list.isNotEmpty;
|
|
}
|