ruby-uebungen/Assignment_020/solution
Thomas Smits fe2c1c6eb6 Update of exercises 2023-05-25 17:47:19 +02:00
..
readme.md Update of exercises 2023-05-25 17:47:19 +02:00

readme.md

Lösung: Callback mit Proc

















































































```ruby def rechner(a, b, lam = nil, &block) lam ||= block ergebnis = lam.call(a, b) ergebnis * 2 end

lam = ->(a, b) { a + b } puts rechner(5, 4, lam) # -> 18