static <V> Decl<V> of(
			final String value,
			final Function<? super String, ? extends V> mapper
		) {
			return Var.isVar(value)
				? new Var<>(value.substring(1))
				: new Val<>(mapper.apply(ESCAPER.unescape(value)));
		}
Returns a new {@link Decl} object with the mapped type {@code B}.

@param mapper the mapping function
@param <B> the mapped type
@return the mapped declaration
@throws NullPointerException if the mapping function is {@code null}
jenetics.ext/src/main/java/io/jenetics/ext/rewriting/TreePattern.java