From 1b70b7ad721e0c6886536281efafdda2879deb6c Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sat, 4 May 2024 09:41:12 +0100 Subject: [PATCH] 04b done --- 04/04b.bqn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 04/04b.bqn diff --git a/04/04b.bqn b/04/04b.bqn new file mode 100644 index 0000000..8832e63 --- /dev/null +++ b/04/04b.bqn @@ -0,0 +1,15 @@ +Split←{ + delims←𝕩∊",-" + blocknums ← +`delims + # Set entries in blocknums to -1 when they correspond with delims. + blocknums ↩ (¯1¨)⌾(delims⊸/) blocknums + blocknums⊔𝕩 +} + +Prep←{⍉>•ParseFloat¨¨Split¨𝕩} + +Main←{𝕊[x0,x1,y0,y1]: + +´((x0≤y1)∧(x1≥y0))∨((y0≤x1)∧(y1≥x0)) +} + +•Show Main Prep •file.Lines ⊑•args -- 2.30.2