Get the first element of the sequence or undefined if sequence is empty.
undefined
import { pipe } from "yta";import { first, of } from "yta/sync";pipe(of("foo", "bar", "baz", "quux"), first());// => "foo" Copy
import { pipe } from "yta";import { first, of } from "yta/sync";pipe(of("foo", "bar", "baz", "quux"), first());// => "foo"
See also:
Get the first element of the sequence or
undefinedif sequence is empty.See also: