Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Fun Ruby
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Guilherme Carlos
July 03, 2015
Technology
100
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Fun Ruby
Functional Programming concepts in Ruby
Guilherme Carlos
July 03, 2015
More Decks by Guilherme Carlos
See All by Guilherme Carlos
What's new in Rails 5?
gtcarlos
0
93
Other Decks in Technology
See All in Technology
Local CI × GitHub Actions
gogutan
2
190
Conditional PED-ANOVA: Hyperparameter Importance in Hierarchical & Dynamic Search Spaces
pfn
PRO
0
130
QA4AI 2026-Oct 生成AI時代の品質保証
tokuty
1
860
パスキーの自動テストはどこまでいけるのか
teamlab
PRO
0
200
初海外で注意すべきこと12選!!!安全快適なre:invent生活にするために
yuuuuuuu168
1
160
今さら理解するウェブフォントver.2026
takanorip
3
770
スキマバイトという雇用形態は存在しないので、雇用期間1日のアルバイト契約を事業者とワーカーが結ぶ手続きを支えるのがタイミーなんです
akitoshiga
0
200
hackers_champloo_2026_tidb
makocchi
0
160
アウトプット初心者、半年間のふりかえり
4o1sobblue
0
430
継続的なAIコスト最適化
bgpat
1
340
AI駆動開発の時代になったのでトヨタ生産方式から見直す
terurou
7
6k
実践!Cloud Run ハンズオン!! / Cloud Run handson
y0hgi
2
280
Featured
See All Featured
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
740
Paper Plane (Part 1)
katiecoart
PRO
2
12k
Fireside Chat
paigeccino
43
4.1k
Claude Code のすすめ
schroneko
67
230k
Designing Powerful Visuals for Engaging Learning
tmiket
1
610
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
How to build a perfect <img>
jonoalderson
1
6.1k
From π to Pie charts
rasagy
1
400
Scaling GitHub
holman
464
140k
Balancing Empowerment & Direction
lara
6
1.3k
Transcript
Fun Ruby Functional Programming concepts in Ruby
Who? Guilherme Carlos 23 Computer Information Systems PUC Campinas @gtcarlos_
gtcarlos
Functional Programming?
None
None
Lambda Calculus 1930s Alonzo Church (Princeton) Lambda Currying Immutability Pure
Functions
LISP 1959 John McCarthy (MIT) Lambda Calculus applied Symbols Garbage
Collector
FP in a Nutshell ➔ Anonymous Functions ➔ Higher Order
Functions ➔ Immutability ➔ No Side-Effects
Ruby is not a functional language! but have some functional
traits
Anonymous Function
Closures
None
➔ Anonymous Functions (Lambda) ➔ Higher Order Functions ➔ Immutability
➔ No Side-Effects
➔ Accept a function as an argument ➔ Return a
function as the return value Higher Order Function
Blocks everywhere!
Enumerable
➔ Anonymous Functions (Lambda) ➔ Higher Order Functions ➔ Immutability
➔ No Side-Effects
Immutability “Much of Ruby, especially its runtime, is much closer
to Python's [than Perl's], with the exception of Ruby's mutable strings, which I find an abomination.” - Guido van Rossum (Python creator)
None
None
None
Bang!
➔ Anonymous Functions (Lambda) ➔ Higher Order Functions ➔ Immutability
➔ No Side-Effects
Pure Functions ➔ The function always evaluates the same result
value given the same argument value ➔ Evaluation of the result does not cause any semantically observable side effect or output
None
None
➔ Anonymous Functions (Lambda) ➔ Higher Order Functions ➔ Immutability
➔ No Side-Effects
Advantages of FP ➔ Best readability ➔ Modularity ➔ Concurrency
➔ Testability
Disadvantages of FP ➔ Not suited to every problem ➔
Academic stuff
Rolling in the Deep Elixir Clojure Scala
Questions?