diff --git a/recursion.ld b/recursion.ld index ad8cc89..be9573e 100644 --- a/recursion.ld +++ b/recursion.ld @@ -6,7 +6,8 @@ fn ngon! (n, size) -> repeat n { fd! (size); rt! (div (1, n)) } & Here we're introducing one of the more important, and """difficult""" concepts in computer science, recursion & Let's read this line-by-line -fn spin_gon! (n, size, angle, growth, times) -> if lte? (times, 0) +fn spin_gon! (n, size, angle, growth, times) -> { + if lte? (times, 0) then :ok & this is the base case: what to do when we're done & in this case, `:ok`--just a little signal all went well else { diff --git a/sierp.ld b/sierp.ld index 2a58f8c..a2ab53d 100644 --- a/sierp.ld +++ b/sierp.ld @@ -13,7 +13,7 @@ let length = 10 & set an angle for all turns, default to 1/3 for triangles -let angle = inv(1) +let angle = inv(3) & define 'G' function from the grammaer fn g! {