aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-21 21:14:57 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-21 21:14:57 -0400
commit741332a368f21568a499354af474e8768f6d4a2c (patch)
tree67ce542620569bf07e0be0e8e9c1ab07726d2117
parent1318616cb0054538bc9fa1c36deddd018fd8502e (diff)
Rename Reduce to Fold
-rw-r--r--README.md2
-rw-r--r--docs/index.html2
-rw-r--r--spec/reference.bqn4
3 files changed, 4 insertions, 4 deletions
diff --git a/README.md b/README.md
index 2555acd8..cc8708a1 100644
--- a/README.md
+++ b/README.md
@@ -158,7 +158,7 @@ Other modifiers control array traversal and iteration. In three cases a simpler
`¨` | Each | `⚇` | Depth
`⌜` | Table |
`⁼` | Undo | `⍟` | Repeat
-`´` | Reduce |
+`´` | Fold |
`˝` | Insert |
`` ` `` | Scan |
diff --git a/docs/index.html b/docs/index.html
index 711e419e..1c538459 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -429,7 +429,7 @@
</tr>
<tr>
<td><code><span class='Modifier'>´</span></code></td>
-<td>Reduce</td>
+<td>Fold</td>
<td></td>
<td></td>
</tr>
diff --git a/spec/reference.bqn b/spec/reference.bqn
index 1d0a5cca..7ed84b1f 100644
--- a/spec/reference.bqn
+++ b/spec/reference.bqn
@@ -69,14 +69,14 @@ Type # Scalar (enclosed) prototype of 𝕩
≢ ↩ IsArray◶⟨⟩‿≢ # LIMITED to monadic case
¨ ← _eachm # LIMITED to monadic case and array 𝕩
-´ ← _reduce
+´ ← _fold
_eachm←{
r←⥊𝕩 ⋄ F←𝔽
E←(≠r)⊸≤◶{r↩r𝕩_amend˜F𝕩⊑r⋄E𝕩+1}‿⊢
E 0 ⋄ (≢𝕩)⥊r
}
-_reduce←{
+_fold←{
! 1==𝕩
l←≠v←𝕩 ⋄ F←𝔽
r←𝕨 (0<l)◶{𝕩⋄Identity f}‿{l↩l-1⋄l⊑𝕩}⊘⊣ 𝕩