From 56bb21b0e696f4b64adc490f7b07519f4baba88a Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sat, 8 Aug 2020 09:56:28 -0400 Subject: Remove r.bqn section comments --- src/r.bqn | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/r.bqn b/src/r.bqn index 7b873db7..1cdf15bc 100644 --- a/src/r.bqn +++ b/src/r.bqn @@ -1,3 +1,6 @@ +# BQN runtime. Requires: +# IsArray Type Log !+-×÷⋆⌊=≤≢⥊⊑↕⌜` + ◶ ← {𝕨((𝕨𝔽𝕩)⊑𝕘){𝔽}𝕩} # LIMITED to number left operand result ⊘ ← {𝕨((1{𝔽}𝕨)-0)◶𝔽‿𝔾 𝕩} ⊢ ← {𝕩} @@ -12,8 +15,8 @@ # LIMITED to numeric arguments for scalar cases < ← {⟨⟩⥊⟨𝕩⟩} ⊘ (1-≤˜) > ← (1-≤) -≢ ↩ IsArray◶⟨⟩‿≢ # LIMITED to monadic case -≠ ← (0<=)◶⟨1⋄0⊑≢⟩ +≢ ↩ IsArray◶⟨⟩‿≢ # LIMITED to monadic case +≠ ← (0<=)◶⟨1⋄0⊑≢⟩ # LIMITED to monadic case _fold←{ ! 1==𝕩 @@ -25,9 +28,6 @@ _fold←{ ´ ← _fold -#⌜ -# LAYER 2: Pervasion - ToArray ← <⍟(1-IsArray) Int←IsArray◶⟨⌊⊸=,0⟩ Nat←IsArray◶⟨0⊸≤×⌊⊸=,0⟩ @@ -151,10 +151,6 @@ SelSub←{ } -#⌜ -# LAYER 3: Remove other limits -# Now all implementations are full except ∾ and ⊑; ↕ is monadic only - Deshape←IsArray◶{⟨𝕩⟩}‿⥊ Reshape←{ ! 1≥=𝕨 @@ -180,10 +176,6 @@ Depth←IsArray◶0‿{1+0⌈´Depth¨⥊𝕩} ≢ ↩ ≢ ⊘ (¬Match) -#⌜ -# LAYER 4: Operators - - DropV← {⊑⟜𝕩¨𝕨+↕𝕨-˜≠𝕩} Cell ← DropV⟜≢ Pair ← {⟨𝕩⟩} ⊘ {⟨𝕨,𝕩⟩} @@ -224,9 +216,6 @@ _insert←{ ˝ ← _insert -#⌜ -# LAYER 5: Structural functions - _onAxes_←{ F←𝔽 (𝔾<≡)∘⊣◶{ # One axis @@ -292,9 +281,6 @@ Replicate ← {0<=𝕨}◶(⥊˜⟜≠Rep⊢)‿{!𝕨=○≠𝕩⋄𝕨Rep𝕩} / ← Indices ⊘ Replicate -#⌜ -# LAYER 6: Everything else - Join←(1≠=)◶⟨∨´1≠=¨,1⟩◶{ # List of lists i←j←¯1⋄e←⟨⟩⋄a←𝕩 -- cgit v1.2.3