This website requires JavaScript.
Explore
Help
Sign In
smits
/
ruby-uebungen
Watch
1
Star
3
Fork
You've already forked ruby-uebungen
0
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
fe2c1c6eb6
ruby-uebungen
/
Assignment_020
/
solution
/
readme.md
563 B
Raw
Blame
History
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