permute method
Generates another instance with some deterministic function.
The only exception is Kind.forNull (because it has no other instances).
Implementation
@override
List<E> permute(List<E> instance) {
if (instance.isEmpty) {
return [elementKind.newInstance()];
}
return instance.map(elementKind.permute).toList();
}