ruby-uebungen/Assignment_021/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: Closure

















































































```ruby def create_counter n = 0 # closure Proc.new { n += 1 } end

p = create_counter puts p.call # -> 1 puts p.call # -> 2