aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-01-08 19:09:35 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-01-08 19:09:35 -0500
commit6f480d3706c9f01f2f9044f4f016853a1e8239e6 (patch)
tree36f861c92f5deba039404ae16576b08c97dd29d8 /src
parente14bfac44de8a5c2e8af4d95d76b6fa29cc38016 (diff)
There's no identity element for ∾˝ on an empty list
Diffstat (limited to 'src')
-rw-r--r--src/r.bqn6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/r.bqn b/src/r.bqn
index cbbdfe7b..55c10950 100644
--- a/src/r.bqn
+++ b/src/r.bqn
@@ -399,7 +399,11 @@ _rankOp_←{
_insert←{
"˝: 𝕩 must have rank at least 1" ! 1≤=𝕩
F←𝔽
- Id ← {s←1 Drop ≢𝕩 ⋄ s joinPrim˙⊸≠◶⟨(0<↕∘≠)⊸×⊸⥊⟜⟨⟩, Reshape⟜Identity⟩ f}
+ Id ← {
+ s ← 1 Drop ≢𝕩
+ JoinSh ← {"˝: Identity does not exist"!0<≠𝕨 ⋄ 𝕨×0<↕≠𝕨}
+ s joinPrim˙⊸≠◶⟨JoinSh⥊𝕩˙, Reshape⟜Identity⟩ f
+ }
𝕨 (0<≠)⊘1◶Id‿{𝕨F´<˘𝕩} 𝕩
}
˝ ← _insert