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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
51
Emacs
felipemocruha
0
22
Introdução a Python e seu Ecossistema
felipemocruha
0
22
Data Structures and Performance
felipemocruha
0
26
Observability
felipemocruha
0
37
Testes de Software
felipemocruha
0
19
Other Decks in Technology
See All in Technology
入門!AWS Blocks
ysuzuki
1
120
フィジカル版Github Onshapeの紹介
shiba_8ro
0
210
小さくはじめるSLI/SLO ~育てながら組織に定着させる実践知~ / Starting Small with SLI/SLOs: Building Adoption Through Continuous Growth
nari_ex
7
1.9k
AmazonRoute 53ではじめてのドメイン取得!HTTPS化までの道のりを整理してみた
usanchuu
3
140
連合学習と機密コンピューティング
lycorptech_jp
PRO
0
120
20260619 私の日常業務での生成 AI 活用
masaruogura
1
200
日本 Fintech 未来予測レポート 2027〜2028年(オリジナル版)
8maki
0
2.2k
非定型業務をAI slackbotで自動化する ~ 社内要望を自動壁打ちするbotを作った ~/automating-ad-hoc-work-with-ai-slackbot
shibayu36
0
650
新しいVibe Codingと”自走”について
watany
6
320
日本 Fintech 未来予測レポート 2027〜2028年(手動編集版)
8maki
0
2.3k
アンオフィシャルな、オフィシャルからのお願い
wyamazak_devrel
0
100
【NRUG vol.18】KubernetesにおけるNew Relicデータ取得量削減の考え方
nrug_member
0
110
Featured
See All Featured
So, you think you're a good person
axbom
PRO
2
2.1k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Designing for humans not robots
tammielis
254
26k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
160
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
290
A Soul's Torment
seathinner
6
2.9k
How to train your dragon (web standard)
notwaldorf
97
6.7k
Ethics towards AI in product and experience design
skipperchong
2
310
Crafting Experiences
bethany
1
180
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
430
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
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