fixing a couple scripts
This commit is contained in:
parent
f5a50854dc
commit
b68fcfc77c
|
@ -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 {
|
||||||
|
|
2
sierp.ld
2
sierp.ld
|
@ -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! {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user