@SuppressWarnings("unchecked")
	default  <A> Response<A> flatMap(final Function<? super T, Response<? extends A>> fn) {
		requireNonNull(fn);

		return (Response<A>)switch (this) {
			case Response.Success<T> s -> fn.apply(s.body());
			case Response.Failure<T> f -> f;
		};
	}
Applies the mapping function to the (success) response object. Errors are
returned unchanged.

@param fn the mapping function
@return the mapped response object
@param <A> the new response body type
jenetics.incubator/src/main/java/io/jenetics/incubator/restful/Response.java