From d69cb9ec07fe52297bb33140a6780f5620285951 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Thu, 9 Jul 2020 08:18:49 -0400 Subject: =?UTF-8?q?Operators=20=E2=8E=89=E2=8D=9F=E2=97=B6=20now=20fully?= =?UTF-8?q?=20supported=20in=20dzaima/BQN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spec/dzref | 45 ++------------------------------------------- 1 file changed, 2 insertions(+), 43 deletions(-) (limited to 'spec') diff --git a/spec/dzref b/spec/dzref index 773ea614..f0354d9f 100755 --- a/spec/dzref +++ b/spec/dzref @@ -1,22 +1,10 @@ #!/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+𝕩)β₯Š