(self: MutableList<A>, message: A)
| 245 | * @since 2.0.0 |
| 246 | */ |
| 247 | export const prepend = <A>(self: MutableList<A>, message: A): void => { |
| 248 | self.head = { |
| 249 | array: [message], |
| 250 | mutable: true, |
| 251 | offset: 0, |
| 252 | next: self.head |
| 253 | } |
| 254 | if (!self.tail) self.tail = self.head |
| 255 | self.length++ |
| 256 | } |
| 257 | |
| 258 | /** |
| 259 | * Prepends all elements from an iterable to the beginning of the MutableList. |