aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-13 21:36:21 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-13 21:36:21 -0400
commit7df1943b0f75b1a92791109049bed9e15b5bb1f0 (patch)
tree546605ee59d88cecd54dd57cc912e13108cc95d3
parent6967d0609bd11b7e5fa5a06e70370a591b5b49f0 (diff)
Use native Reverse and vector Index Of
-rwxr-xr-xspec/dzref10
1 files changed, 4 insertions, 6 deletions
diff --git a/spec/dzref b/spec/dzref
index 23ea3390..3502106a 100755
--- a/spec/dzref
+++ b/spec/dzref
@@ -69,11 +69,10 @@ Windows←{
𝕨{(∾⟜(π•¨β‰ βŠΈβ†“β‰’π•©)βˆ˜β‰’β₯Š>)<Β¨βŠΈβŠβŸœπ•©Β¨s(Β¬+βŒœβ—‹β†•βŠ’)β₯Šπ•¨}⍟(0<≠𝕨)𝕩
}
-Reverse ← {!1≀≠≒𝕩 β‹„ (-β†•βŠΈΒ¬β‰ π•©)βŠπ•©}
-Rotate ← {!Int𝕨 β‹„ l←≠𝕩⋄(l|𝕨+↕l)βŠπ•©} _onAxes_ 0
+Rotate ← ⌽ _onAxes_ 0
↕ ↩ ↕ ⊘ Windows
-⌽ ← Reverse ⊘ Rotate
+⌽ ↩ ⌽ ⊘ Rotate
#⌜
@@ -106,7 +105,7 @@ Group←{
βŠ” ← Group⟜(β†•β‰ βš‡1) ⊘ Group
# Searching
-IndexOf←{
+IndexOf←(1<βŒˆβ—‹(β‰ β‰’))β—ΆβŠβ€Ώ{
c←1-Λœβ‰ β‰’π•¨
! 0≀c
𝕨 (0<≠𝕨)β—ΆβŸ¨0βŽ‰c∘⊒,((+Β΄<˘)∧`)β‰’βŽ‰cβŽ‰cβ€ΏβˆžβŸ© 𝕩
@@ -209,8 +208,7 @@ X←Raw←{≀4}
⍎"Type ← ⟨⟩β₯Š0⊸β₯Š"
'!' Mod "{𝕩 β‹„ ≀1}⍟¬"
- '↕' Mod "↕"
- '∾' Mod "∾"
+ Mod⟜β₯ŠΒ¨ "β†•βˆΎβŒ½βŠ"
# checks if line is a builtin redefinition