From 73cd4c0f33660b8642d66584d2530493b49e2a08 Mon Sep 17 00:00:00 2001 From: Johannes Nydahl Date: Thu, 21 Nov 2024 09:33:22 +0100 Subject: [PATCH] update index search defs --- quickref/quickref.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/quickref/quickref.tex b/quickref/quickref.tex index 94b785c4..4b5afbce 100644 --- a/quickref/quickref.tex +++ b/quickref/quickref.tex @@ -1008,10 +1008,10 @@ & \texttt{xs.lengthCompare(n)} & Returns -1 if xs is shorter than n, +1 if it is longer, else 0. \\\cline{1-3} - Index & \texttt{xs.indexOf(x)} & The index of the first element in xs equal to x.\\ \cline{2-3} - search: & \texttt{xs.lastIndexOf(x)} & The index of the last element in xs equal to x.\\\cline{2-3} - & \texttt{xs.indexOfSlice(ys) \newline xs.lastIndexOfSlice(ys)} & The (last) index of xs such that successive elements starting from that index form the sequence ys.\\\cline{2-3} - & \texttt{xs.indexWhere(p)} & The index of the first element in xs that satisfies p.\\\cline{2-3} + Index & \texttt{xs.indexOf(x)} & The index of the first element in xs equal to x, or -1 if not found.\\ \cline{2-3} + search: & \texttt{xs.lastIndexOf(x)} & The index of the last element in xs equal to x, or -1 if not found.\\\cline{2-3} + & \texttt{xs.indexOfSlice(ys) \newline xs.lastIndexOfSlice(ys)} & The (last) index of xs such that successive elements starting from that index form the sequence ys. Returns -1 if not found.\\\cline{2-3} + & \texttt{xs.indexWhere(p)} & The index of the first element in xs that satisfies p, or -1 if not found.\\\cline{2-3} & \texttt{xs.segmentLength(p, i)} & The length of the longest uninterrupted segment of elements in xs, starting with xs(i), that all satisfy the predicate p.\\\cline{2-3} & \texttt{xs.prefixLength(p)} & Same as \texttt{ xs.segmentLength(p, 0)}\\\cline{1-3}