arr = [1, 2, 3, 4, 5] result = arr.partition { |x| x.odd? }.map(&:sum) puts result.join(',')
arr = [1, 2, 3, 4, 5] result = arr.each_cons(2).map { |x, y| x + y } puts result.join(',')
arr = [1, 2, 3, 4, 5] result = arr.sort_by { |x| -x } puts result.join(',')
convert_to_hash