private static <K, V> int keyIndexIn(PSequence<Entry<K, V>> entries, Object key) {
        int i = 0;
        for (Entry<K, V> entry : entries) {
            if (entry.getKey().equals(key))
                return i;
            i++;
        }
        return -1;
    }