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
25
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
31
Desenvolvendo aplicações web com Flask e Docker
felipemocruha
0
20
Docker e Kubernetes
felipemocruha
0
31
Emacs
felipemocruha
0
19
Introdução a Python e seu Ecossistema
felipemocruha
0
14
Data Structures and Performance
felipemocruha
0
21
Observability
felipemocruha
0
32
Testes de Software
felipemocruha
0
11
Other Decks in Technology
See All in Technology
AWS アーキテクチャ作図入門/aws-architecture-diagram-101
ma2shita
29
11k
VISITS_AIIoTビジネス共創ラボ登壇資料.pdf
iotcomjpadmin
0
160
【TiDB GAME DAY 2025】Shadowverse: Worlds Beyond にみる TiDB 活用術
cygames
0
1.1k
Amazon Bedrockで実現する 新たな学習体験
kzkmaeda
2
540
Welcome to the LLM Club
koic
0
170
GeminiとNotebookLMによる金融実務の業務革新
abenben
0
230
M3 Expressiveの思想に迫る
chnotchy
0
100
フィンテック養成勉強会#54
finengine
0
180
AWS Summit Japan 2025 Community Stage - App workflow automation by AWS Step Functions
matsuihidetoshi
1
260
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
26k
Witchcraft for Memory
pocke
1
310
20250625 Snowflake Summit 2025活用事例 レポート / Nowcast Snowflake Summit 2025 Case Study Report
kkuv
1
310
Featured
See All Featured
Building Applications with DynamoDB
mza
95
6.5k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
Practical Orchestrator
shlominoach
188
11k
Agile that works and the tools we love
rasmusluckow
329
21k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Music & Morning Musume
bryan
46
6.6k
The Straight Up "How To Draw Better" Workshop
denniskardys
234
140k
Embracing the Ebb and Flow
colly
86
4.7k
Writing Fast Ruby
sferik
628
61k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
Making Projects Easy
brettharned
116
6.3k
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