Skip to content

Commit c7c8584

Browse files
committed
update spiral example
1 parent 243335a commit c7c8584

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/spiral.ua

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Creates a number spiral that is common is code golf problems
2-
F ← ◌°⟜⊡ ⊃(
3-
⟜(↘¯1 ▽ ▽2+1⇡⟜(◿4⇡+-1.) # Orientations
4-
:[0_1 ¯1_0 0_¯1 1_0] # Directions
5-
0_0\+ # Offsets
2+
F ← ⌝⊡⊃(
3+
⟜(↘¯1 ▽⊃(▽2+1⇡|◿4⇡+⊸-1) # Orientations
4+
⊙A₂ # Directions
5+
0\+ # Offsets
66
)
77
+¤⌊÷2⊟. # Indices
88
| +1⇡×. # Numbers

0 commit comments

Comments
 (0)