Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Langtons-ant/BQN/langtons-ant.bqn
Normal file
18
Task/Langtons-ant/BQN/langtons-ant.bqn
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
Rot ← ¬⊸{-⌾(𝕨⊸⊑)⌽𝕩}
|
||||
Fmt ← ⊏⟜" #"
|
||||
_while_ ← {𝔽⍟𝔾∘𝔽_𝕣_𝔾∘𝔽⍟𝔾𝕩}
|
||||
|
||||
Ant ← 2⊑{ # Generator Block
|
||||
p‿d‿g:
|
||||
r ← d Rot˜ p⊑g
|
||||
⟨
|
||||
p + r
|
||||
r
|
||||
¬⌾(p⊸⊑)g
|
||||
⟩
|
||||
} _while_ { # Condition Block
|
||||
p‿d‿g:
|
||||
∧´(p≥0‿0)∧p<≢g
|
||||
}
|
||||
|
||||
•Show Fmt Ant ⟨50‿50, 0‿1, 100‿100⥊0⟩
|
||||
Loading…
Add table
Add a link
Reference in a new issue