yta
    Preparing search index...

    Function last

    • Get the last item of a sequence, or undefined if the sequence is empty.

      import { pipe } from "yta";
      import { of, last } from "yta/sync";

      pipe(of("foo", "bar", "baz", "quux"), last());
      // => "quux"

      See also:

      Type Parameters

      • A

      Returns (items: Iterable<A>) => A | undefined