about summary refs log blame commit diff
path: root/users/sterni/exercises/aoc/lib.bqn
blob: 636eeace78d2b34b3f275b1d04ce2199c1509e5d (plain) (tree)
1
2
3
4
5
6
7
8
9





                                                                    
                                           

                                          
IsAsciiNum ⇐ ('0'⊸≤∧≤⟜'9')

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

SplitOn ⇐ ((⊢ (-1˙)⍟⊣¨ +`∘(1⊸»<⊢))∘(≡¨)⊔⊢)
SplitAt ← ((⊣≤↕∘≠∘⊢)⊔⊢)

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