Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Lambdas and Pops - Jan Hettich
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Las Vegas Ruby Group
June 18, 2014
0
95
Lambdas and Pops - Jan Hettich
Las Vegas Ruby Group
June 18, 2014
Tweet
Share
More Decks by Las Vegas Ruby Group
See All by Las Vegas Ruby Group
Ruby ISO Standard - David Grayson
lvrug
0
150
Windows Automation - Howard Feldman
lvrug
0
94
Separating Your Application from Rails - Brian Hughes
lvrug
0
150
SWIG and Ruby - David Grayson
lvrug
0
92
Practical Object-Oriented Design in Ruby - Charles Jackson
lvrug
3
140
The Hamster Gem - Ryan Mulligan
lvrug
1
110
Varnish+Redis - Russ Smith
lvrug
1
120
Making Good Use of Fonts - Russ Smith
lvrug
1
100
Writing Files - Ryan Mulligan
lvrug
0
79
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Code Reviewing Like a Champion
maltzj
528
40k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
A better future with KSS
kneath
240
18k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
80
The SEO identity crisis: Don't let AI make you average
varn
0
400
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
300
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
190
Agile that works and the tools we love
rasmusluckow
331
21k
Transcript
λ's and POP's Jan Hettich LVRUG 5/21/2014
Two kinds of Proc “plain old proc” lambda closure? yes
yes class Proc Proc .lambda? false true semantics yield invocation similar to block method
Creation • “Plain old procs” • Kernel.proc {|args| code} •
Proc.new {|args| code} • Lambdas • Kernel.lambda {|args| code} • literal: ->(args) {code} • Method.to_proc
call syntax • direct call – foo.call(args) – foo[args] –
foo.(args) • block-style call – iterator args, &foo
call semantics • yield semantics (blocks, pops) • similar to
parallel assignment • return => lexically enclosing method • invocation semantics (methods, lambdas) • number of arguments must match • “diminutive return”
Let's look at some code • A Digression on Method
• Argument Passing • return statement • Using next • New behavior in Ruby 2.1.0