aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-09-15 14:54:09 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-09-15 14:55:18 -0400
commit8013cfa27c143e2a9abe6fe6f24e00d92396886d (patch)
tree90e44267c44acef8c332cdd4a83e64ead5256983 /src
parent1450c56754c1b2a1b42fc78547f384b83aa8dc13 (diff)
Compare atoms to @ instead of ∞ so that NaN formats as a number
Diffstat (limited to 'src')
-rw-r--r--src/fmt.bqn4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fmt.bqn b/src/fmt.bqn
index 3db01657..f1171c1e 100644
--- a/src/fmt.bqn
+++ b/src/fmt.bqn
@@ -1,7 +1,7 @@
# Format an array to a string including newlines
{
F0←𝔽 # Function to format a scalar
- FmtAtom ← (≍ β‰€βŸœβˆžβ—ΆβŸ¨@βŠΈβ‰ β—ΆβŸ¨"@","'"⊸(∾∾⊣)⟩,F0⟩)
+ FmtAtom ← (≍ <⟜@β—ΆβŸ¨@βŠΈβ‰ β—ΆβŸ¨"@","'"⊸(∾∾⊣)⟩,F0⟩)
# Vertical padding for arrays of rank greater than 2
PadV ← {
@@ -52,7 +52,7 @@
(=𝕩) Enframe 2 Pad 𝕨 PaddingJoin Fmt¨𝕩
}
- FmtSimple ← (β‰ (0⊸<+≀)+Β΄)∘(β₯Šβ‰€βˆžΛ™)β—Ά{ # Depth 1
+ FmtSimple ← (β‰ (0⊸<+≀)+Β΄)∘(β₯Š<@Λ™)β—Ά{ # Depth 1
# All characters
k ← ∞⍟(0⊸=) -β‰  c ← Β―1↓≒𝕩
q ← '"'