carpentries-incubator / julia-novice

A lesson exploring the Julia language
https://carpentries-incubator.github.io/julia-novice
Other
16 stars 23 forks source link

Expand macro section #15

Open BeastyBlacksmith opened 3 years ago

BeastyBlacksmith commented 3 years ago

It would be very nice to get

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.