Returns the last index at which target occurs in source as a contiguous run, comparing elements with SameValueZero, or -1 when it does not occur. An empty target occurs at source.size.
target
source
-1
source.size
Time: O(n·m) for sizes n and m.
n
m
The list to search.
The run to find.
The last index of the run, or -1.
TypeError when either argument is not a list from this library.
lastIndexOfSubList(asList([1, 2, 3, 2, 3]), asList([2, 3])) // 3 Copy
lastIndexOfSubList(asList([1, 2, 3, 2, 3]), asList([2, 3])) // 3
Returns the last index at which
targetoccurs insourceas a contiguous run, comparing elements with SameValueZero, or-1when it does not occur. An empty target occurs atsource.size.Time: O(n·m) for sizes
nandm.