20. Creating A Lambda



I am totally lost right now. I have no idea what i am doing..could someone help me out please. Error Message : Make sure you put the capital M in quotes like this 'M'

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 { |x| 'M' < x}


Hi your lambda should have a key/value like that

lambda {|key,value| ...}

then you should put the value less than "M" inside your lambda
Hope that could help you.


In hashes, you have to have two parameters for both the values, so, you have to add another parameter and then say the rest of the code.

Ex. Do:

first_half = lambda { |x, (**your second parameter**)| 'M' < (**Your second parameter**}

Don't Do:

 first_half = lambda { |x| 'M' < x}