~/talk

Ruby Lambdas

Talkat RubyConf 2022 · 2022-11-29..12-01· [ruby]
slides:none on file

Ruby lambdas are shown as practical tools: they have strict arity checking and return only from the lambda (procs differ), they act as closures, and they work as callables interchangeable with procs or methods. Examples include formatter lambdas in a Rex gem configuration hash, transform chains using inject, partial application and Curry to build triplers, and a worked buffered enumerable class that handles ingestion and yields. A five‑method example gives complexity 20 and refactoring into nested lambdas cuts that complexity to less than a third.

AI-written summary · about

  1. 0:00Start
  2. 2:05Ways to Call a Lambda
  3. 5:56Self Invoking Anonymous Functions
  4. 7:55Comparing Lambda and Nonlambda Return Behavior
  5. 8:41Comparing Lambdas and Procs Arity Checking
  6. 15:16Lambdas as Nested Functions: Formatters
  7. 16:37Lambdas in Behavior Lookups
  8. 25:08Transform Chains - ETL "Lite"
  9. 26:16Partial Application
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.