The Ruby Lambda


I don't understand why write in here? a_lambda is a parameter, why we can use .call on a parameter? (I do understand .call from previous exercises.)

def lambda_demo(a_lambda)
  puts "I'm the method!"

lambda_demo(lambda { puts "I'm the lambda!" })


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.