diff options
author | sterni <sternenseemann@systemli.org> | 2022-12-01T12·41+0100 |
---|---|---|
committer | sterni <sternenseemann@systemli.org> | 2022-12-01T23·38+0000 |
commit | 6abea467e2023a63e3413317c90409d11175f9a9 (patch) | |
tree | e16d1aaf1d8765b6c20ed27455a27ee07f6e02f9 /users/sterni/exercises/aoc/2021 | |
parent | 6fd9792240fe3797477e31a209743440718932aa (diff) |
chore(sterni/exercises/aoc): split out utils into a library of sorts r/5362
Change-Id: Id2bb764fcdcd4b345eed6a98e0d67fcb18fc1353 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7488 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'users/sterni/exercises/aoc/2021')
-rwxr-xr-x | users/sterni/exercises/aoc/2021/solutions.bqn | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/users/sterni/exercises/aoc/2021/solutions.bqn b/users/sterni/exercises/aoc/2021/solutions.bqn index 4cedb567f9aa..f7247cadf280 100755 --- a/users/sterni/exercises/aoc/2021/solutions.bqn +++ b/users/sterni/exercises/aoc/2021/solutions.bqn @@ -4,17 +4,10 @@ # Utilities # -IsAsciiNum ← ('0'⊸≤∧≤⟜'9') - -ReadInt ← {(𝕨⊸×+⊣)´∘⌽-⟜'0'𝕩} # stolen from leah2 -ReadDec ← 10⊸ReadInt +⟨IsAsciiNum,ReadInt,ReadDec,SplitOn,_fix⟩ ← •Import •path∾"/../lib.bqn" ReadInput ← {•file.Lines ∾ •path‿"/input/day"‿(•Fmt 𝕩)} -SplitOn ← ((⊢ (-1˙)⍟⊣¨ +`∘(1⊸»<⊢))∘(≡¨)⊔⊢) - -_fix ← {𝕩 𝕊∘⊢⍟≢ 𝔽 𝕩} - # # 2021-12-01 # |