Code examples from my ChicagoRuby talk on lamdas, blocks, Procs, and company.
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
.hgignore
.hgtags
README.md
Rakefile
abstraction.rb
alias_brackets.rb
arity.rb
asset_host.rb
backtrace_cleaner_example.rb
bind_unbind.rb
block_capture.rb
block_return.rb
block_yield.rb
c_in_ruby.rb
class_proc.rb
closure.rb
contain_exceptions.rb
contain_exceptions_rspec.rb
contain_values.rb
error_handling.rb
first_class_spec.rb
identity_crisis.rb
iterators.rb
java_in_ruby.rb
lambda.rb
lambda1.9.rb
lambda_rack.rb
method.rb
monad_spec.rb
non_local_return_lambda.rb
non_local_return_locations.rb
non_local_return_spec.rb
object_rack.rb
passing_the_block.rb
passing_the_proc.rb
proc_arguments.rb
proc_objects.rb
respond_to_example.rb
self.rb
self_bogus_spec.rb
self_spec.rb
shared_scope.rb
storage.rb
super_spec.rb
to_proc.rb
transmutation.rb
y_combinator_spec.rb
you_already_use_closure.rb

README.md

Code examples for Justin Love's lambda/closure talks

  • "Lambdas, Procs and Blocks, Oh My", ChicagoRuby (Elmhurst) 2010-02-20
  • "Lambda and Closure: Horrors of the Computer Science Mythos", Great Lakes Ruby Bash, 2010-04-17

http://JustinLove.name/presentations/index.html

The first version of the talk had several examples that didn't make the cut, and with refactoring the greater part are longer used.

The examples were originally developed under 1.8.7; as of last check, they all run under 1.9.1. My environment is OS X using MacPorts; in particular, this environment installs 1.8 as 'ruby' and 1.9 as 'ruby1.9'.

Generating Output

run rake; it will create .txt files with interleaved input/output, using irb and rspec.