array = [5,3,1,2]
discrete = array.enum_slice(2)

# Same as: Enumerable::Enumerator.new(array,:each_slice,2)
overlap = array.enum_cons(2)

# Same as: Enumerable::Enumerator.new(array,:each_cons,2)
discrete.each {|x| puts x.join(",") }

# Output:
# 5,3
# 1,2
overlap.each {|x| puts x.join(",") }
# Output:
# 5,3
# 3,1
# 1,2

