aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-13 16:50:24 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-13 16:50:24 -0400
commit6967d0609bd11b7e5fa5a06e70370a591b5b49f0 (patch)
tree7b876c01447231bbb07e4cb0495e1116f03baabc
parent78da6a2065313bf29aa18a7a1161f84724972fe6 (diff)
Tests for Bins
-rw-r--r--problems.md2
-rw-r--r--test/testref.bqn5
2 files changed, 6 insertions, 1 deletions
diff --git a/problems.md b/problems.md
index acd3c9f7..3722b4b9 100644
--- a/problems.md
+++ b/problems.md
@@ -42,7 +42,7 @@ It seems that the first is the most common, but the others aren't really rare. T
The left argument feels much more like the primary one in these cases (indeed, this matches the typical left-to-right ordering of binary operators in mathematics). Not really fixable; too much precedent.
### Can't access array ordering directly
-Only `⍋⍒` use array ordering rather than just array comparison or numeric ordering. Getting at the actual ordering to just compare two arrays is more difficult than it should be.
+Only `⍋⍒` use array ordering rather than just array comparison or numeric ordering. Getting at the actual ordering to just compare two arrays is more difficult than it should be (but not *that* difficult: `⥊⊸⍋⌾<` is TAO `≤`).
### Syntactic type erasure
A programmer can call an operator on either a syntactic function or value, but there's no way to know within the operator which syntax that operand had. Maybe this is a better design, but it doesn't feel quite right that `f˜` is `f`-Swap if `f` has a function value. The array syntax suggest it should be Constant.
diff --git a/test/testref.bqn b/test/testref.bqn
index b9ad6387..d6217106 100644
--- a/test/testref.bqn
+++ b/test/testref.bqn
@@ -303,4 +303,9 @@
⟨1,2,3,1‿2,2‿1,1‿3,2‿2,3‿1⟩(⥊⊸(≠∘⊣∾˜¯1⊸⊑⊸(⌊∾⊣)∾×´⊸⌊)⌜≡○(⍋⥊)⥊⟜(+`(↕6)¬∘∊⊢)⌜)↕4
((⥊˜-⥊⟜2‿0)∘≠≡⍋+⍒)2/↕5
"edcba"≡∨"bdace"
+ (↕7)≡∧⍋|⟜⌽1+↕7
+ ⟨1,3,∞,'e','i'⟩ (⍋≡≠∘⊣(⊣↓⊢⍋⊸⊏+`∘>)⍋∘∾) (2÷˜↕8)∾"aegz"
+ ⟨'z','d',1‿0,0⟩ (⍒≡≠∘⊣(⊣↓⊢⍋⊸⊏+`∘>)⍒∘∾) (2÷˜↕8)∾"aegz"
+ (<1)≡(↕2‿3)⍋1+↕3
+ (<0)≡"abc"⥊⊸⍒○<≍"acc"