21/21 Code is Not correct but can't seem to get the code to compile


#1

crew = {
captain: "Picard",
first_officer: "Riker",
lt_cdr: "Data",
lt: "Worf",
ensign: "Ro",
counselor: "Troi",
chief_engineer: "LaForge",
doctor: "Crusher"
}

Add your code below!

first_half = lambda{|r,n{| r[n] < "M"}
a_to_m = crew.select(&first_half)


#2

The stray { jumps out. Consider the following...

lambda {|r,n| n < "M"}