MCPcopy Index your code
hub / github.com/Effect-TS/effect / pop

Function pop

packages/effect/src/MutableList.ts:241–248  ·  view source on GitHub ↗
(self: MutableList<A>)

Source from the content-addressed store, hash-verified

239 * @since 0.0.1
240 */
241export const pop = <A>(self: MutableList<A>): A | undefined => {
242 const tail = self.tail
243 if (tail !== undefined) {
244 remove(self, tail)
245 return tail.value
246 }
247 return undefined
248}
249
250/**
251 * Prepends the specified value to the beginning of the list.

Callers

nothing calls this directly

Calls 1

removeFunction · 0.85

Tested by

no test coverage detected