default <B>
	InvertibleCodec<B, G> map(
		final Function<? super T, ? extends B> mapper,
		final Function<? super B, ? extends T> inverseMapper
	) {
		requireNonNull(mapper);
		requireNonNull(inverseMapper);

		return InvertibleCodec.of(
			encoding(),
			mapper.compose(decoder()),
			encoder().compose(inverseMapper)
		);
	}
Create a new {@code InvertibleCodec} with the mapped result type.

This method can also be used for creating non-trivial codes like split
ranges, as shown in the following example, where only values between
<em>[0, 2)</em> and <em>[8, 10)</em> are valid.
<pre>{@code
  +--+--+--+--+--+--+--+--+--+--+
  |  |  |  |  |  |  |  |  |  |  |
  0  1  2  3  4  5  6  7  8  9  10
  |-----|xxxxxxxxxxxxxxxxx|-----|
     ^  |llllllll|rrrrrrrr|  ^
     |       |        |      |
     +-------+        +------+
}</pre>

{@snippet lang="java":
final InvertibleCodec<Double, DoubleGene> codec = Codecs
    .ofScalar(DoubleRange.of(0, 10))
    .map(v -> {
            if (v >= 2 && v < 8) {
                return v < 5 ? ((v - 2)/3)*2 : ((8 - v)/3)*2 + 8;
            }
            return v;
        },
        Function.identity());
}

@see Codec#map(Function)

@param mapper the mapper function
@param inverseMapper the inverse function of the {@code mapper}
@param <B> the new argument type of the given problem
@return a new {@link InvertibleCodec} with the mapped result type
@throws NullPointerException if one the mapper is {@code null}.
jenetics/src/main/java/io/jenetics/engine/InvertibleCodec.java