ba719f8f5e
Change-Id: I1504cd5e443ff0b28c2d97ae357e5d92c88bba4d Reviewed-on: https://cl.tvl.fyi/c/depot/+/7601 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Autosubmit: sterni <sternenseemann@systemli.org>
17 lines
490 B
BQN
17 lines
490 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"}
|
||
|
||
Xor ⇐ (¬⊸∧∨∧⟜¬)
|