Creates map from array using key function

  • Type Parameters

    • T
    • K

    Parameters

    • f: (x: T) => K

      Function to generate key

    • xs: T[]

      Array to index

    Returns Map<K, T>

    Map of values by key