MCPcopy
hub / github.com/Effect-TS/effect / head

Function head

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

Source from the content-addressed store, hash-verified

700 * @category getters
701 */
702export const head = <A>(self: List<A>): Option.Option<A> => isNil(self) ? Option.none() : Option.some(self.head)
703
704/**
705 * Returns the last element of the specified list, or `None` if the list is

Callers 3

goFunction · 0.70
Pretty.tsFile · 0.70
Arbitrary.tsFile · 0.70

Calls 1

isNilFunction · 0.85

Tested by

no test coverage detected