$30 off During Our Annual Pro Sale. View Details »
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
33
Desenvolvendo aplicações web com Flask e Docker
felipemocruha
0
22
Docker e Kubernetes
felipemocruha
0
36
Emacs
felipemocruha
0
20
Introdução a Python e seu Ecossistema
felipemocruha
0
16
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
EM歴1年10ヶ月のぼくがぶち当たった苦悩とこれからへ向けて
maaaato
0
270
Gemini でコードレビュー知見を見える化
zozotech
PRO
1
250
大企業でもできる!ボトムアップで拡大させるプラットフォームの作り方
findy_eventslides
1
700
非CUDAの悲哀 〜Claude Code と挑んだ image to 3D “Hunyuan3D”を EVO-X2(Ryzen AI Max+395)で動作させるチャレンジ〜
hawkymisc
1
170
Karate+Database RiderによるAPI自動テスト導入工数をCline+GitLab MCPを使って2割削減を目指す! / 20251206 Kazuki Takahashi
shift_evolve
PRO
1
690
SSO方式とJumpアカウント方式の比較と設計方針
yuobayashi
7
590
re:Invent 2025 ~何をする者であり、どこへいくのか~
tetutetu214
0
210
Snowflakeでデータ基盤を もう一度作り直すなら / rebuilding-data-platform-with-snowflake
pei0804
4
1.3k
形式手法特論:CEGAR を用いたモデル検査の状態空間削減 #kernelvm / Kernel VM Study Hokuriku Part 8
ytaka23
2
460
AIと二人三脚で育てた、個人開発アプリグロース術
zozotech
PRO
1
710
LLM-Readyなデータ基盤を高速に構築するためのアジャイルデータモデリングの実例
kashira
0
230
エンジニアリングマネージャー はじめての目標設定と評価
halkt
0
270
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Faster Mobile Websites
deanohume
310
31k
Being A Developer After 40
akosma
91
590k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Statistics for Hackers
jakevdp
799
230k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.4k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
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