grad = gradient(x -> (shoot_distance(x, environment) - environment.target_distance), imprecise_trebuchet)
return a Trebuchet however this would require an extra section covering either promotion rules or creating methods via metaprogramming, which feels a bit beyond the scope of the current lesson, but may make material for an addon episode for advanced audiences.
It would be very nice to get
return a
Trebuchet
however this would require an extra section covering either promotion rules or creating methods via metaprogramming, which feels a bit beyond the scope of the current lesson, but may make material for an addon episode for advanced audiences.