Blocs procs and lambdas 15/21


#1

Hi i'm stuck in this code and i don't understand what refuse to works

. mon_tableau = ["raindrops", :kettles, "whiskers", :mittens, :packages]

filtre_symbole = lambda { |symbole| symbole.is_a? Symbole}
symbole = mon_tableau.select(&filtre_symbole)

error code : your syntaxe is incorect


#2

@lorielparis,
You will want to use

filtre_symbole = lambda { |symbole| symbole.is_a? Symbol}

#3

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