Guest User

Untitled

a guest
Nov 20th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. [1, 2, 3, 6, 8, 9, 10, 23, 34, 35, 36, 45, 50, 51...]
  2.  
  3. [6, 23, 45, ...]
  4.  
  5. array.select.with_index{ |x, index| (array[index-1] != x-1) && (array[index+1] != x+1)}
Add Comment
Please, Sign In to add comment