aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-07-07 12:38:38 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-07-07 12:38:38 -0400
commit8d9506d2fe2063d9b5d4604e5d3d7c2b2ce3df56 (patch)
tree9b3940ed311d9a71d67ccef0155f54b2b185ed31 /doc
parent4d602ea36183e62e463cea08900a16ea6240a03f (diff)
Mention ¯1⊑ as the obvious way to get the last element
Diffstat (limited to 'doc')
-rw-r--r--doc/pick.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/pick.md b/doc/pick.md
index 12a7003c..425b8cf9 100644
--- a/doc/pick.md
+++ b/doc/pick.md
@@ -52,9 +52,10 @@ If `𝕩` is empty then Pick always results in an error. First never gives an er
So one way to find the fill element for an array `𝕩` of any shape is `⊑0⥊𝕩`.
-In APL it's common to get the last element of a list with an idiom that translates to `⊑⌽`, or First-[Reverse](reverse.md). I prefer to use [Fold](fold.md) with the Right [identity function](identity.md).
+In APL it's common to get the last element of a list with an idiom that translates to `⊑⌽`, or First-[Reverse](reverse.md). In BQN the most straightforward way is to select with index `¯1` instead. I also sometimes use [Fold](fold.md) with the Right [identity function](identity.md).
⊑⌽ "last"
+ ¯1⊑ "last"
⊢´ "last"
## Many elements