21/21Passing Your Lambda to a Method


#1

first_half = lambda {|x,y| y < "M"}
a_to_m = crew.select (&first_half)

Oops, try again. Did you create a variable called a_to_m?
how to fix this case?


#2

Can you paste your whole code between three backticks? (`)

On a first glance everything looks right with those two lines, except the (&first_half) part. It should be exactly after the select method (e.g. no whitespace).
Like this:

a_to_m = crew.select(&first_half)

#3

That looks right. Maybe try deleting the space between .select and (&first_half)