Creating a Proc.Not getting Output


#1

ages = [23, 101, 7, 104, 11, 94, 100, 121, 101, 70, 44]

under_100=Proc.new{|x| x<100? true : false}
ages.each(&p)

can anyone help me?


#2

If you change the order it works OK.

under_100 = Proc.new { |x| return x if x<100}