import type { Inspectable } from "@effect/data/Inspectable";
import type { Pipeable } from "@effect/data/Pipeable";
declare const TypeId: unique symbol;
/**
* @since 1.0.0
* @category symbol
*/
export type TypeId = typeof TypeId;
/**
* @since 1.0.0
* @category model
*/
export interface MutableList extends Iterable, Pipeable, Inspectable {
readonly [TypeId]: TypeId;
}
/**
* Creates an empty `MutableList`.
*
* @since 1.0.0
* @category constructors
*/
export declare const empty: () => MutableList;
/**
* Creates a new `MutableList` from an `Iterable`.
*
* @since 1.0.0
* @category constructors
*/
export declare const fromIterable: (iterable: Iterable) => MutableList;
/**
* Creates a new `MutableList` from the specified elements.
*
* @since 1.0.0
* @category constructors
*/
export declare const make: (...elements: readonly A[]) => MutableList;
/**
* Returns `true` if the list contains zero elements, `false`, otherwise.
*
* @since 1.0.0
* @category getters
*/
export declare const isEmpty: (self: MutableList) => boolean;
/**
* Returns the length of the list.
*
* @since 1.0.0
* @category getters
*/
export declare const length: (self: MutableList) => number;
/**
* Returns the last element of the list, if it exists.
*
* @since 1.0.0
* @category getters
*/
export declare const tail: (self: MutableList) => A | undefined;
/**
* Returns the first element of the list, if it exists.
*
* @since 1.0.0
* @category getters
*/
export declare const head: (self: MutableList) => A | undefined;
/**
* Executes the specified function `f` for each element in the list.
*
* @since 1.0.0
* @category traversing
*/
export declare const forEach: {
(f: (element: A) => void): (self: MutableList) => void;
(self: MutableList, f: (element: A) => void): void;
};
/**
* Removes all elements from the doubly-linked list.
*
* @since 1.0.0
*/
export declare const reset: (self: MutableList) => MutableList;
/**
* Appends the specified element to the end of the `MutableList`.
*
* @category concatenating
* @since 1.0.0
*/
export declare const append: {
(value: A): (self: MutableList) => MutableList;
(self: MutableList, value: A): MutableList;
};
/**
* Removes the first value from the list and returns it, if it exists.
*
* @since 0.0.1
*/
export declare const shift: (self: MutableList) => A | undefined;
/**
* Removes the last value from the list and returns it, if it exists.
*
* @since 0.0.1
*/
export declare const pop: (self: MutableList) => A | undefined;
/**
* Prepends the specified value to the beginning of the list.
*
* @category concatenating
* @since 1.0.0
*/
export declare const prepend: {
(value: A): (self: MutableList) => MutableList;
(self: MutableList, value: A): MutableList;
};
export {};
//# sourceMappingURL=MutableList.d.ts.map