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
A gentle introduction to functional programming
Search
Stefano Armenes
April 20, 2020
Programming
1
370
A gentle introduction to functional programming
Stefano Armenes
April 20, 2020
Tweet
Share
More Decks by Stefano Armenes
See All by Stefano Armenes
reactjs_milano_intersection_2019.pdf
stearm
0
270
React with super powers using TypeScript
stearm
0
380
Other Decks in Programming
See All in Programming
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
760
PipeCDのプラグイン化で目指すところ
warashi
1
300
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
2
1.1k
The Niche of CDK Grant オブジェクトって何者?/the-niche-of-cdk-what-isgrant-object
hassaku63
1
610
Flutterで備える!Accessibility Nutrition Labels完全ガイド
yuukiw00w
0
170
バイブコーディング超えてバイブデプロイ〜CloudflareMCPで実現する、未来のアプリケーションデリバリー〜
azukiazusa1
0
330
Azure AI Foundryではじめてのマルチエージェントワークフロー
seosoft
0
200
Deep Dive into ~/.claude/projects
hiragram
14
14k
Startups on Rails in Past, Present and Future–Irina Nazarova, RailsConf 2025
irinanazarova
0
240
ISUCON研修おかわり会 講義スライド
arfes0e2b3c
1
470
初学者でも今すぐできる、Claude Codeの生産性を10倍上げるTips
s4yuba
16
13k
マッチングアプリにおけるフリックUIで苦労したこと
yuheiito
0
190
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
For a Future-Friendly Web
brad_frost
179
9.8k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
48
2.9k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Side Projects
sachag
455
42k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Git: the NoSQL Database
bkeepers
PRO
430
65k
Gamification - CAS2011
davidbonilla
81
5.4k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
KATA
mclloyd
30
14k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Transcript
A GENTLE INTRODUCTION TO FUNCTIONAL PROGRAMMING ENGINEERING MEETUP - 20TH
APRIL 2020 Luca Di Stefano, Luca Ruzzola, Stefano Armenes
A GENTLE INTRODUCTION TO FUNCTIONAL PROGRAMMING WHY?
A GENTLE INTRODUCTION TO FUNCTIONAL PROGRAMMING Pillars - referential transparency
- function composition - no side-effects
A GENTLE INTRODUCTION TO FUNCTIONAL PROGRAMMING No side-effects, really? -
any operation that interacts with an external system - out-of-scope resources mutations - exceptions
A GENTLE INTRODUCTION TO FUNCTIONAL PROGRAMMING ANYTHING IS A FUNCTION
…or better, an expression!
A GENTLE INTRODUCTION TO FUNCTIONAL PROGRAMMING Referential transparency is all
about expression Is this function referential transparent?
A GENTLE INTRODUCTION TO FUNCTIONAL PROGRAMMING Referential transparency is all
about expression and what about this?
A GENTLE INTRODUCTION TO FUNCTIONAL PROGRAMMING Referential transparency is all
about expression and what about this?
A GENTLE INTRODUCTION TO FUNCTIONAL PROGRAMMING Pure function A pure
function is a function that, given the same input, always returns the same output without producing any side-effect.
A GENTLE INTRODUCTION TO FUNCTIONAL PROGRAMMING Pure function A pure
function is a function that, given the same input, always returns the same output without producing any side-effect. Benefits - readability - parallelisation - memoization - more testable
A GENTLE INTRODUCTION TO FUNCTIONAL PROGRAMMING We can compose two
functions f and g when f domain is a subset of g domain. f ∘ g === f(g(x)) Composing functions
A GENTLE INTRODUCTION TO FUNCTIONAL PROGRAMMING Composing functions …but, we
are missing somethings! We can compose two functions f and g when f domain is a subset of g domain. f ∘ g === f(g(x))
A GENTLE INTRODUCTION TO FUNCTIONAL PROGRAMMING Partial functions We want
to live a world where every function is a total function Is this function total?
A GENTLE INTRODUCTION TO FUNCTIONAL PROGRAMMING Cool but, why my
computation fails? Option[T]
A GENTLE INTRODUCTION TO FUNCTIONAL PROGRAMMING Either[L, R]
A GENTLE INTRODUCTION TO FUNCTIONAL PROGRAMMING Monads are your functional
design patterns! Choose what you need IO List Option Either Set Future … Try
A GENTLE INTRODUCTION TO FUNCTIONAL PROGRAMMING DEMO
A GENTLE INTRODUCTION TO FUNCTIONAL PROGRAMMING Questions?
A GENTLE INTRODUCTION TO FUNCTIONAL PROGRAMMING Thanks!