Prelude API
    Preparing search index...

    Function maybeSortedLast

    • Creates a function that returns the last element after sorting the iterable, or undefined if empty.

      Type Parameters

      • T

      Parameters

      • cmp: Cmp.t<T>

        The comparator function to use for sorting

      Returns <U>(values: Iterable<U>) => T | undefined

      A function that takes an iterable and returns its last element after sorting, or undefined if empty