require_relative 'euler'
def products_of_three_digits
[].tap do |products|
(100..999).each do |i|
(100..999).each do |j|
products << i*j
end
def solution
products_of_three_digits.select { |x| Euler.palindrome?(x) }.max