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
Functional Programming with examples
Search
felipe
November 20, 2019
Technology
34
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Functional Programming with examples
felipe
November 20, 2019
More Decks by felipe
See All by felipe
Aplicações Flask Resilientes com Envoy e Kubernetes
felipemocruha
0
40
Desenvolvendo aplicações web com Flask e Docker
felipemocruha
0
27
Docker e Kubernetes
felipemocruha
0
53
Emacs
felipemocruha
0
22
Introdução a Python e seu Ecossistema
felipemocruha
0
22
Data Structures and Performance
felipemocruha
0
27
Observability
felipemocruha
0
37
Testes de Software
felipemocruha
0
21
Other Decks in Technology
See All in Technology
AIとペアプロを始める。人とのペアプロをやめる。ペアプロの良さを改めて知る。もっと好きになった。 / Rediscovering Pair Programming
honyanya
1
280
GoCon2026 - Open Source, Open World
sanposhiho
1
140
bet_ai_day_2026_session02
agenticsec
2
1.3k
2026-09-10 【Snowflake World Tour Tokyo 2026】dbt Core と Snowflake で実現する多層的なデータガバナンス / Multi-Layered Data Governance Powered by dbt Core and Snowflake
civitaspo
0
150
データエンジニアの困りごとをDevinと一緒に解消する
10xinc
2
850
Oracle Cloud Infrastructure IaaS 新機能アップデート 2026/6 - 2026/8
oracle4engineer
PRO
0
120
2026-09-11 【Snowflake World Tour Tokyo 2026】Snowflakeを起点に、AI Agentが自律稼働し続ける未来へ / Driving AI Agents with Snowflake
civitaspo
0
110
GuardDuty 検知対応を DevOps Agent で効率化しようとしている話 / GuardDuty Investigations with DevOps Agent
masahirokawahara
1
330
[DroidKaigi 2026] Making UI specifications visible: Android UI development in the AI agent era supported by Compose Screenshot Testing and galleries
syarihu
0
600
AIで仕事のやり方を変える
matsu7874
1
960
Kiro Crewしか勝たん!?
miu_crescent
PRO
0
180
リージョンの壁を越える、 ちょっと変わったAWSサービスの話
falken
PRO
0
270
Featured
See All Featured
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.3k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
490
A Soul's Torment
seathinner
7
3.6k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
270
Six Lessons from altMBA
skipperchong
29
4.5k
Typedesign – Prime Four
hannesfritz
42
3.2k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
520
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
What's in a price? How to price your products and services
michaelherold
247
13k
Transcript
functional programming with examples 1
2 Lambda Calculus (1930) LISP (1958) ML (1973) John Backus
Paper (1978) Haskell (1990) SICP (1985) Clojure (2007) Idris (2012)
3
pure functions 4
immutability 5 >>> a = [1, 2, 3, 4] >>>
a.append(5) >>> a [1, 2, 3, 4, 5] >>> from pyrsistent import pvector >>> a = pvector([1, 2, 3, 4]) >>> a.append(5) pvector([1, 2, 3, 4, 5]) >>> a pvector([1, 2, 3, 4])
immutability 6 list plist access O(1) O(log32 n) -> Na
prática O(1) append O(1) O(log32 n) -> Na prática O(1)
immutability 7
currying 8
closures 9
partial application 10
partial application 11
partial application 12
partial application 13
lazy evaluation 14
lazy evaluation 15
higher-order functions 16
higher-order functions 17
higher-order functions 18
higher-order functions 19
recursion 20
function composition 21
function composition 22
pattern matching 23
DISCLAIMER Strange stuff ahead! 24
algebraic data types (ADT) - product types 25
algebraic data types (ADT) - sum types 26
algebraic data types (ADT) - sum types 27
“A typeclass is a sort of interface that defines some
behavior. If a type is a part of a typeclass, that means that it supports and implements the behavior the typeclass describes.” Learn You a Haskell for Great Good! type classes 28
type classes 29
type classes - functor 30
type classes - applicatives and monads http://www.adit.io/posts/2013-04-17-functors,_applicatives,_ and_monads_in_pictures.html 31
where to learn more? 32 • https://purelyfunctional.tv/article/ • https://www.cs.kent.ac.uk/people/staff/dat/miranda/whyfp9 0.pdf
• https://www.amazon.com/dp/1617291412/ref=cm_sw_r_cp_ep_dp _TIbkAbAM04EN7 • https://lispcast.com/category/writing/ • https://www.youtube.com/user/DrBartosz/playlists