Could you please tell me what is the core difference between my solution below:

and the correct one for this lesson, as follows:

What was my goal? I'd like to make lambda which could be called any time we need to check an array. For example we have another array called "odds_n_ends_2" so we could just call as follows:

So our code will be a bit shorter.
Am I correct?


My Ruby knowledge is a bit rusty, but I can see that your code should be written as:

odds_n_ends = [:weezard, 42, "Trady Blix", 3, true, 19, 12.345]
my_method = lambda {|int| int.is_a? Integer}
ints = odds_n_ends.select(&my_method)

Because you want ints to be the result of calling the lambda on the odds array, not the actual lambda itself.

P.S. Kudos for your innovative approach of using a lambda :smiley:

Hope it helps!


Thanks! Now I see my mistake

P.S. What does it mean Kudos?)) I'm not native english-speaker))


Kudos just means like congrats or well done or praising you on achieving something nice :slightly_smiling: