From f574a6e983f60e53f804a776d02c74de0f814535 Mon Sep 17 00:00:00 2001 From: Simon Christ Date: Mon, 28 Aug 2023 12:00:57 +0200 Subject: [PATCH] show methods output --- 05_Write_functions.jl | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/05_Write_functions.jl b/05_Write_functions.jl index 70a106c0..952197c1 100644 --- a/05_Write_functions.jl +++ b/05_Write_functions.jl @@ -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. @@ -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 @@ -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