Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 0e9f3f5c52
Fetching contributors…

Cannot retrieve contributors at this time

37 lines (33 sloc) 0.452 kB
square(size, col) {
colour col
repeat 4 {
forward size
right 90
}
}
myrepeat(num, block) {
if num > 0 {
eval block
myrepeat(num-1, block)
}
}
polygon(sides, size, col) {
if sides > 2 {
colour col
angle = 360/sides
myrepeat(sides, {
forward size
right angle
})
}
}
main() {
x = 100
square(x, blue)
penup
left 90
forward 200
right 90
pendown
polygon(10, 25, red)
}
Jump to Line
Something went wrong with that request. Please try again.