fixing a couple scripts

This commit is contained in:
Matt Nish-Lapidus 2024-06-18 11:53:31 -04:00
parent f5a50854dc
commit b68fcfc77c
2 changed files with 3 additions and 2 deletions

View File

@ -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 & Here we're introducing one of the more important, and """difficult""" concepts in computer science, recursion
& Let's read this line-by-line & 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 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 & in this case, `:ok`--just a little signal all went well
else { else {

View File

@ -13,7 +13,7 @@
let length = 10 let length = 10
& set an angle for all turns, default to 1/3 for triangles & 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 & define 'G' function from the grammaer
fn g! { fn g! {