diff options
Diffstat (limited to 'users/sterni')
-rw-r--r-- | users/sterni/exercises/aoc/2022/05/5.bqn | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/users/sterni/exercises/aoc/2022/05/5.bqn b/users/sterni/exercises/aoc/2022/05/5.bqn index e65975db9476..bca18c1f63c2 100644 --- a/users/sterni/exercises/aoc/2022/05/5.bqn +++ b/users/sterni/exercises/aoc/2022/05/5.bqn @@ -9,11 +9,10 @@ stacks ← { cmds ← {0‿1‿1-˜ ReadDec¨ ((∧´IsAsciiNum)¨/⊢) (<' ') SplitOn 𝕩}¨ rc -ModestTake ← ↑⍟(<⟜≠) _ApplyCmd ← { - c‿f‿t ← 𝕩 - m ← 𝔽 c ModestTake f⊑𝕨 - (m⊸∾)⌾(t⊸⊑) (c⊸↓)⌾(f⊸⊑)𝕨 + s Fn _self c‿f‿t : + m‿k ← 2↑ c ((≤⟜(↕≠))⊔⊢) f⊑s + (Fn m)⊸∾⌾(t⊸⊑) k˙⌾(f⊸⊑) s } •Out "day05.1: "∾⊑¨stacks ⌽_ApplyCmd˜´ ⌽ cmds |