8fda0544d7
Change-Id: I401ba09198d447628fa76d811fd4fe780baa8240 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7586 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Autosubmit: sterni <sternenseemann@systemli.org>
15 lines
459 B
BQN
15 lines
459 B
BQN
IsAsciiNum ⇐ ('0'⊸≤∧≤⟜'9')
|
||
|
||
# based on leah2's function
|
||
ReadInt ⇐ {
|
||
𝕨 𝕊 𝕩: '-'=⊑𝕩? -𝕨 𝕊 1↓𝕩;
|
||
𝕨 𝕊 𝕩: (𝕨⊸×+⊣)´∘⌽-⟜'0'𝕩
|
||
}
|
||
ReadDec ⇐ 10⊸ReadInt
|
||
|
||
SplitOn ⇐ ((⊢ (-1˙)⍟⊣¨ +`∘(1⊸»<⊢))∘(≡¨)⊔⊢)
|
||
SplitAt ← ((⊣≤↕∘≠∘⊢)⊔⊢)
|
||
|
||
_fix ⇐ {𝕩 𝕊∘⊢⍟≢ 𝔽 𝕩}
|
||
|
||
ImportBqnLibs ⇐ {•Import 𝕩∾˜"/"∾˜¯1↓1⊑•SH "printenv"‿"BQNLIBS"}
|