# Example 3# http://www.mapleprimes.com/questions/135686-Searching-A-List-For-Two-Consecutive-Elements# pagan, gives a more general example# return all indices of a list such that two consecutive elements are any pair of consecutive integers

L := [op(L),1,2,3]: # making sure such occurrences exist

[seq(`if`(L[i+1]=L[i]+1,i,NULL),i=1..nops(L)-1)];

[51, 52]

# Example 4# http://www.mapleprimes.com/posts/127832-Deleting-Rows-In-A-Matrix# In a Matrix delete all rows that have negative entries in the first column