permute method

  1. @override
Map<K, V> permute(
  1. Map<K, V> instance
)
override

Generates another instance with some deterministic function.

The only exception is Kind.forNull (because it has no other instances).

Implementation

@override
Map<K, V> permute(Map<K, V> instance) {
  return Map<K, V>.fromEntries(
    instance.entries.map((entry) {
      return MapEntry<K, V>(
        keyKind.permute(entry.key),
        valueKind.permute(entry.value),
      );
    }),
  );
}