Skip to content

Commit

Permalink
show methods output
Browse files Browse the repository at this point in the history
  • Loading branch information
BeastyBlacksmith committed Aug 28, 2023
1 parent ad0705b commit f574a6e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions 05_Write_functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,7 @@ shoot_distance(5, 0.25pi, 500)

function shoot_distance(trebuchet::Trebuchet, env::Environment)
shoot_distance(env.wind, trebuchet.release_angle, trebuchet.counterweight)
#md end ;
#nb end
end

# This method will call the former method and pass the correct fields from the
# `Trebuchet` and `Environment` structures.
Expand All @@ -176,8 +175,7 @@ function shoot_distance(trebuchet::Trebuchet, env::Environment)

function shoot_distance(args...) # slurping
Trebuchets.shoot(args...)[2] # splatting
#md end ;
#nb end
end

# ### Anonymous functions

Expand All @@ -192,8 +190,7 @@ function shoot_distance(args...) # slurping

function (windspeed, angle, weight)
Trebuchets.shoot(windspeed, angle, weight)[2]
#md end ;
#nb end
end

# ### Errors and macros

Expand Down

0 comments on commit f574a6e

Please sign in to comment.