Playing with arrays
Check if all array elements are equals
arr = [0, 0, 0, 0, 0, 0, 0]
puts true if arr.uniq.length == 1
Array includes a sub array
(subarray & array) == array
Compute values occurences
[1, 1, 2, 3, 4, 5, 5, 5, 5].tally
=> {1=>2, 2=>1, 3=>1, 4=>1, 5=>4}