diff options
author | sterni <sternenseemann@systemli.org> | 2021-12-13T23·47+0100 |
---|---|---|
committer | sterni <sternenseemann@systemli.org> | 2021-12-13T23·56+0100 |
commit | b5eb90196e1c3209cc72a3862234ef1997a10eca (patch) | |
tree | a6fd4db96300f90559cce4c6466b4542982e330c /users/sterni/exercises/aoc | |
parent | 1303f3fc71a359479d9c2478c0db2759c3c738c2 (diff) |
refactor(sterni/aoc/2021): determine width/height in the same fold r/3230
Change-Id: I39410171402cedc3ee8d9ac972557656ed12de53
Diffstat (limited to 'users/sterni/exercises/aoc')
-rwxr-xr-x | users/sterni/exercises/aoc/2021/solutions.bqn | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/users/sterni/exercises/aoc/2021/solutions.bqn b/users/sterni/exercises/aoc/2021/solutions.bqn index 0d7ed9dbcd9d..1810fc316b4b 100755 --- a/users/sterni/exercises/aoc/2021/solutions.bqn +++ b/users/sterni/exercises/aoc/2021/solutions.bqn @@ -239,8 +239,7 @@ day13Folds ← ParseFolds 1 ⊑ day13Input PerformAllFolds ← {(-1)⊸⊑(<𝕩) {(𝕨 _Fold)´𝕩}` 𝕨} DotMatrix ← { - width ← 1+⌈´⊑¨𝕩 - height ← 1+⌈´1⊸⊑¨𝕩 + ⟨width, height⟩ ← 1+⌈´𝕩 {𝕩? '█';' '}¨ height‿width⥊≠¨⊔((⊣+(width⊸×)∘⊢)´)¨ 𝕩 } |