code: public static <T> Codec<ISeq<T>, BitGene> ofSubSet(
  		final ISeq<? extends T> basicSet
  	) {
  		requireNonNull(basicSet);
  		require.positive(basicSet.length());
  
  		return Codec.of(
  			Genotype.of(BitChromosome.of(basicSet.length())),
  			gt -> gt.getChromosome()
  				.as(BitChromosome.class).ones()
  				.<T>mapToObj(basicSet)
  				.collect(ISeq.toISeq())
  		);
  	}
docs: The subset {@code Codec} can be used for problems where it is required to
  find the best <b>variable-sized</b> subset from given basic set. A typical
  usage example of the returned {@code Codec} is the Knapsack problem.
  <p>
  The following code snippet shows a simplified variation of the Knapsack
  problem.
  <pre>{@code
  public final class Main {
  // The basic set from where to choose an 'optimal' subset.
  private final static ISeq<Integer> SET =
  ISeq.of(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
  
  // Fitness function directly takes an 'int' value.
  private static int fitness(final ISeq<Integer> subset) {
  assert(subset.size() <= SET.size());
  final int size = subset.stream()
  .collect(Collectors.summingInt(Integer::intValue));
  return size <= 20 ? size : 0;
  }
  
  public static void main(final String[] args) {
  final Engine<BitGene, Double> engine = Engine
  .builder(Main::fitness, codec.ofSubSet(SET))
  .build();
  ...
  }
  }
  }</pre>
  
  @param <T> the element type of the basic set
  @param basicSet the basic set, from where to choose the <i>optimal</i>
  subset.
  @return a new codec which can be used for modelling <i>subset</i>
  problems.
  @throws NullPointerException if the given {@code basicSet} is
  {@code null}; {@code null} elements are allowed.
  @throws IllegalArgumentException if the {@code basicSet} size is smaller
  than one.