First page
Back
Continue
Last page
Overview
Graphics
Blöcke und Closures
def mal(faktor)
return proc { |x| faktor * x }
end
mal2 = mal(2)
mal2.call(3) #-> 6
(1..3).collect &mal2 #-> [2, 4, 6]