Slide 8
Slide 8 text
Functional
Callable blocks (procs and lambdas) with closures
More about this in Threads, callbacks, and execution context in Ruby
# Define a lambda
y, l = 1, ->(x) { x + y }
# Call it
l.call(2) # => 3
# Use it for collection transformation
[1, 2, 3].map(&l). # => [2, 3, 4]
reduce(&:+) # => 9
Threads, callbacks… talk