ruby-uebungen/Assignment_023/solution
Thomas Smits 25d5ac7ffd Initial commit 2023-05-23 09:19:31 +02:00
..
readme.md Initial commit 2023-05-23 09:19:31 +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