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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
felipe
November 20, 2019
Technology
30
0
Share
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
38
Desenvolvendo aplicações web com Flask e Docker
felipemocruha
0
25
Docker e Kubernetes
felipemocruha
0
45
Emacs
felipemocruha
0
21
Introdução a Python e seu Ecossistema
felipemocruha
0
20
Data Structures and Performance
felipemocruha
0
25
Observability
felipemocruha
0
36
Testes de Software
felipemocruha
0
16
Other Decks in Technology
See All in Technology
色を視る
yuzneri
0
280
AI時代における技術的負債への取り組み
codenote
1
2k
需要創出(Chatwork)×供給(BPaaS) フライホイールとMoat 実行能力の最適配置とAI戦略
kubell_hr
0
1.6k
Cortex Codeのコスト見積ヒントご紹介
yokatsuki
0
130
[Oracle TechNight#99] 生成AI時代のAI/ML入門 ~ AIとオラクルデータベースの関係 (後半)
oracle4engineer
PRO
1
140
Modernizing Your HCL Connections Experience: Visual Report to chain, Profile Enhancements, and AI Integration
wannesrams
0
210
AI와 협업하는 조직으로의 여정
arawn
0
560
M5Stack CoreS3とZephyr(RTOS)で Edge AIっぽいことしてみた
iotengineer22
0
400
AWS Agent Registry の基礎・概要を理解する/aws-agent-registry-intro
ren8k
3
420
AzureのIaC管理からログ調査まで、随所に役立つSkillsとCustom-Instructions / Boosting IaC and Log Analysis with Skills
aeonpeople
0
350
プラットフォームエンジニアリングの実践 - AWS コンテナサービスで構築する社内プラットフォーム / AWS Containers Platform Meetup #1
literalice
1
230
Microsoft 365 / Microsoft 365 Copilot : 自分の状態を確認する「ラベル」について
taichinakamura
0
420
Featured
See All Featured
Abbi's Birthday
coloredviolet
2
7.3k
Into the Great Unknown - MozCon
thekraken
41
2.4k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
170
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
270
The untapped power of vector embeddings
frankvandijk
2
1.7k
Done Done
chrislema
186
16k
Visualization
eitanlees
150
17k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
330
Joys of Absence: A Defence of Solitary Play
codingconduct
1
350
Measuring & Analyzing Core Web Vitals
bluesmoon
9
810
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.9k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
140
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