Returns array sorted by key function

  • Type Parameters

    • T

    Parameters

    • f: (x: T) => any

      Function to generate sort key

    • xs: T[]

      Array to sort

    Returns T[]

    Sorted array