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
0
28
Functional Programming with examples
felipe
November 20, 2019
Tweet
Share
More Decks by felipe
See All by felipe
Aplicações Flask Resilientes com Envoy e Kubernetes
felipemocruha
0
36
Desenvolvendo aplicações web com Flask e Docker
felipemocruha
0
23
Docker e Kubernetes
felipemocruha
0
42
Emacs
felipemocruha
0
20
Introdução a Python e seu Ecossistema
felipemocruha
0
18
Data Structures and Performance
felipemocruha
0
23
Observability
felipemocruha
0
34
Testes de Software
felipemocruha
0
13
Other Decks in Technology
See All in Technology
制約が導く迷わない設計 〜 信頼性と運用性を両立するマイナンバー管理システムの実践 〜
bwkw
3
900
Bedrock PolicyでAmazon Bedrock Guardrails利用を強制してみた
yuu551
0
180
2人で作ったAIダッシュボードが、開発組織の次の一手を照らした話― Cursor × SpecKit × 可視化の実践 ― Qiita AI Summit
noalisaai
1
380
外部キー制約の知っておいて欲しいこと - RDBMSを正しく使うために必要なこと / FOREIGN KEY Night
soudai
PRO
12
5.1k
We Built for Predictability; The Workloads Didn’t Care
stahnma
0
130
Deno・Bunの標準機能やElysiaJSを使ったWebSocketサーバー実装 / ラーメン屋を貸し切ってLT会! IoTLT 2026新年会
you
PRO
0
300
Webhook best practices for rock solid and resilient deployments
glaforge
1
280
FinTech SREのAWSサービス活用/Leveraging AWS Services in FinTech SRE
maaaato
0
130
使いにくいの壁を突破する
sansantech
PRO
1
130
Tebiki Engineering Team Deck
tebiki
0
24k
ブロックテーマでサイトをリニューアルした話 / 2026-01-31 Kansai WordPress Meetup
torounit
0
460
20260204_Midosuji_Tech
takuyay0ne
1
140
Featured
See All Featured
The agentic SEO stack - context over prompts
schlessera
0
630
Tell your own story through comics
letsgokoyo
1
810
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
200
Chasing Engaging Ingredients in Design
codingconduct
0
110
Game over? The fight for quality and originality in the time of robots
wayneb77
1
110
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
The SEO Collaboration Effect
kristinabergwall1
0
350
Practical Orchestrator
shlominoach
191
11k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
380
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
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