From 3d518b0b0568c2013dd5eb35ab87a7431433d5a9 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sun, 5 May 2024 12:32:25 +0100 Subject: [PATCH] Tidy up and comment map prep in 05a --- 05/05a.bqn | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/05/05a.bqn b/05/05a.bqn index f144cf1..7990c6b 100644 --- a/05/05a.bqn +++ b/05/05a.bqn @@ -13,10 +13,11 @@ Prep1Proc←{ # Prepare one step of procedure Prep←{ ⟨rawmap, rawproc⟩←(""⊸≡¨𝕩)Split𝕩 - map0←{(𝕩≠' ')/𝕩}¨<˘⍉⌽>¯1↓rawmap - map1←⟨""⟩∾(1=4|↕≠map0)/map0 + map0←⍉>¯1↓rawmap # Drop last line and transpose + map1←(1=4|↕≠map0)/map0 # Extract crate letters from chaff + map←⟨""⟩∾{(𝕩≠' ')/𝕩}¨<˘map1 # Convert to a 0-based list of strings proc←∾Prep1Proc¨rawproc - ⟨map1, proc⟩ + ⟨map, proc⟩ } •Show Prep •file.Lines ⊑•args -- 2.30.2