Water collected between towers: Difference between revisions

Line 3,055:
[ dup 0 = iff drop done
dup 2 times
[ 2520 * 1 walk
1 4 turn
2520 1 walk
1 4 turn ] ] is bar ( [ --> )
 
Line 3,067:
dup colour
fill bar
dup 2520 * 1 fly
dip
[ behead
Line 3,073:
dup colour
fill bar ]
-2520 * 1 fly
1 4 turn
2520 1 fly
-1 4 turn ]
drop
1 4 turn
-2520 * 1 fly ] is chart ( [ [ --> )
 
[ [] 0 rot witheach
Line 3,111:
mins diffs sum ] is task2 ( [ --> )
 
turtle -540 1 fly
 
' [ [ 1 5 3 7 2 6 4 5 9 1 2 ] task1
 
' [ [ 1 5 3 7 2 ]
[ 5 3 7 2 6 4 5 9 1 2 ]
[ 2 6 3 5 2 8 1 4 2 2 5 3 5 7 4 1 ]
Line 3,122 ⟶ 3,120:
[ 8 7 7 6 ]
[ 6 7 10 7 6 ] ]
dup
 
witheach [ task2 echo sp ]</syntaxhighlight>
[ dup size swap
task1
' [ [ 1+ 520 3* 71 2fly ]
witheach
[ task2 echo sp ]</syntaxhighlight>
 
{{out}}
 
I see from the discussion page that drawing the towers wasn't part of the task. Here itthey isare anyway.
 
"What is the use of a book," thought Alice, "without pictures or conversations?"
 
[[File:Quackery - Water collected between towers.png|framethumb|center]]
 
<pre>2 14 35 0 0 0 0</pre>
1,462

edits