From 013ad025b20ec3ca73d7847e994a9a1ca4b68cc3 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Thu, 9 May 2024 13:43:49 +0100 Subject: [PATCH] 09a: restructure to calculate head and tail paths separately --- 09/09a.bqn | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/09/09a.bqn b/09/09a.bqn index 9d0161a..4f9d027 100644 --- a/09/09a.bqn +++ b/09/09a.bqn @@ -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 -- 2.30.2