aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rwxr-xr-xspec/dzref45
1 files changed, 2 insertions, 43 deletions
diff --git a/spec/dzref b/spec/dzref
index 773ea614..f0354d9f 100755
--- a/spec/dzref
+++ b/spec/dzref
@@ -1,23 +1,11 @@
#!/usr/bin/env dbqn
-impl ← "β—Ά ← {𝕨((𝕨𝔽𝕩)βŠ‘π•˜){𝔽}𝕩}
+impl ← "
∧ ← Γ—
∨ ← (+-Γ—)
#⌜
-# LAYER 2: Pervasion
-# After defining _perv, we apply it to all scalar functions,
-# making them pervasive. I'm not going to write that out.
-
-ToArray ← IsArrayβ—Ά<β€ΏβŠ’
-
-_perv←{ # Pervasion
- (βŠ’βŠ˜βˆ¨β—‹IsArray)β—ΆβŸ¨π”½β‹„π”½{𝕨𝔽_perv𝕩}¨⟩
-}
-
-
-#⌜
# LAYER 3: Remove other limits
# Now all implementations are full but ↕ is monadic only
@@ -41,27 +29,6 @@ _depthOp_←{
𝕨 n _d 𝕩
}
βš‡ ← _depthOp_
-_rankOp_←{
- k←𝕨(≍○(β‰ β‰’) (0β‰€βŠ’)β—ΆβŸ¨βŒŠβŸœ-,0⌈-⟩¨ 𝔾_ranks)𝕩
- Enc←{
- fβ†βŠ‘βŸœ(≒𝕩)¨↕𝕨
- c←1Γ—Β΄s←𝕨Cell𝕩
- fβ₯ŠβŠ‘βŸœ(β₯Šπ•©)¨∘((sβ₯Šβ†•c)+cΓ—βŠ’)¨↕1Γ—Β΄f
- }
- > ((βŠ‘k)Enc𝕨) 𝔽¨ ((1-Λœβ‰ )βŠΈβŠ‘k)Enc𝕩
-}
-_iterate_←{
- n←𝕨𝔾𝕩
- fβ†βŠ‘π•¨βŸ¨π”½βŸ©βŠ˜βŸ¨π•¨π”½βŠ’βŸ©π•©
- l←u←0
- {!Int𝕩⋄l↩lβŒŠπ•©β‹„u↩uβŒˆπ•©}βš‡0 n
- a←𝕩⋄_p←{π”½βˆ˜βŠ£`(1+𝕩)β₯Š<a}
- pos←F _p u β‹„ neg←F⁼_p-l
- (|βŠ‘<⟜0βŠ‘posβ€Ώneg˜)βš‡0 n
-}
-
-βŽ‰ ← _rankOp_
-⍟ ← _iterate_
#⌜
@@ -105,14 +72,6 @@ Windows←{
Reverse ← {!1≀≠≒𝕩 β‹„ (-β†•βŠΈΒ¬β‰ π•©)βŠπ•©}
Rotate ← {!Int𝕨 β‹„ l←≠𝕩⋄(l|𝕨+↕l)βŠπ•©} _onAxes_ 0
-Indices←{
- ! 1=≠≒𝕩
- ! ∧´Nat¨𝕩
- βŸ¨βŸ©βˆΎΒ΄π•©β₯ŠΒ¨β†•≠𝕩
-}
-Rep ← Indices⊸⊏
-Replicate ← {0<≠≒𝕨}β—Ά(β₯ŠΛœβŸœβ‰ Rep⊒)β€Ώ{!𝕨=○≠𝕩⋄𝕨Rep𝕩} _onAxes_ (1-0=β‰ )
-
↕ ↩ ↕ ⊘ Windows
⌽ ← Reverse ⊘ Rotate
@@ -223,7 +182,7 @@ X←Raw←{≀4}
chrsβ†βŸ¨
"!βˆ§βˆ¨βˆΎβ†‘β†•βŒ½β‰β‹β’βŠβŠ’βˆŠβ·βŠ”"
""
- "βŽ‰βš‡βŸβ—Ά"
+ "βš‡"
⟩
nc ← β‰ Β¨chrs
chr ← ∾chrs