(self: MutableList<A>, message: A)
| 219 | * @since 2.0.0 |
| 220 | */ |
| 221 | export const prepend = <A>(self: MutableList<A>, message: A): void => { |
| 222 | self.head = { |
| 223 | array: [message], |
| 224 | mutable: true, |
| 225 | offset: 0, |
| 226 | next: self.head |
| 227 | } |
| 228 | if (!self.tail) self.tail = self.head |
| 229 | self.length++ |
| 230 | } |
| 231 | |
| 232 | /** |
| 233 | * Prepends all elements from an iterable to the beginning of the MutableList. |