chiark / gitweb /
09a: restructure to calculate head and tail paths separately
authorBen Harris <bjh21@bjh21.me.uk>
Thu, 9 May 2024 12:43:49 +0000 (13:43 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Thu, 9 May 2024 12:43:49 +0000 (13:43 +0100)
09/09a.bqn

index 9d0161ab4202032e8c67fc83a882834d7503b34e..4f9d0271d4436139060e5fc6d588844bacbfd2b3 100644 (file)
@@ -8,8 +8,10 @@ Prep←{
 
 StepH←{h𝕊m:h+m}
 StepT←{t𝕊h:t+(×h-t)×(∨´1<|h-t)}
-Step←{⟨h,t⟩𝕊m:h StepH↩m,t StepT↩h,⟨h,t⟩}
 
-Main←{+´∊1⊑¨ (<⟨⟨0,0⟩,⟨0,0⟩⟩)Step`𝕩}
+Main←{
+  start←<⟨0,0⟩
+  +´∊ start StepT` start StepH` 𝕩
+}
 
 •Show Main Prep •file.Lines ⊑•args