a-foundation/src/main/java/com/ajjpj/afoundation/collection/immutable/ALongHashMap.java
@SuppressWarnings("unused")
    public static <K extends Number, V, E extends Throwable> ALongHashMap<V> fromKeysAndFunction(Iterable<K> keys, AFunction1<? super K, ? extends V, E> f) throws E {
        final Iterator<K> ki = keys.iterator();

        ALongHashMap<V> result = empty ();

        while(ki.hasNext()) {
            final K key = ki.next();
            final V value = f.apply(key);

            result = result.updated(key.longValue (), value);
        }
        return result;
    }
@SuppressWarnings("unused")
    public static <K extends Number, V, E extends Throwable> ALongHashMap<V> fromKeysAndFunction(Iterable<K> keys, AFunction1<? super K, ? extends V, E> f) throws E {
        final Iterator<K> ki = keys.iterator();

        ALongHashMap<V> result = empty ();

        while(ki.hasNext()) {
            final K key = ki.next();
            final V value = f.apply(key);

            result = result.updated(key.longValue (), value);
        }
        return result;
    }
Returns an ALongHashMap instance initialized from a collection of
keys and a function. For each element of the <code>keys</code> collection, the function is called once to
determine the corresponding value, and the pair is then stored in the map.