about summary refs log tree commit diff
path: root/users/sterni/exercises/aoc/lib.bqn
blob: 025102b7760b5319a5cddee35ef1ea488ca5a1a5 (plain) (blame)
1
2
3
4
5
6
7
8
IsAsciiNum ⇐ ('0'⊸≤∧≤⟜'9')

ReadInt ⇐ {(𝕨⊸×+⊣)´∘⌽-⟜'0'𝕩} # stolen from leah2
ReadDec ⇐ 10⊸ReadInt

SplitOn ⇐ ((⊢ (-1˙)⍟⊣¨ +`∘(1⊸»<⊢))∘(≡¨)⊔⊢)

_fix ⇐ {𝕩 𝕊∘⊢⍟≢ 𝔽 𝕩}