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
Boulder Startup Week: What is functional progra...
Search
Brian McKenna
May 13, 2014
Programming
68
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Boulder Startup Week: What is functional programming?
Brian McKenna
May 13, 2014
More Decks by Brian McKenna
See All by Brian McKenna
Production PureScript
puffnfresh
0
120
PureScript
puffnfresh
2
590
LambdaConf: Idris Workshop
puffnfresh
2
130
Other Decks in Programming
See All in Programming
CSC307 Lecture 17
javiergs
PRO
0
320
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
6
890
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
260
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
110
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
220
Lessons from Spec-Driven Development
simas
PRO
0
180
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
12k
3Dシーンの圧縮
fadis
1
760
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
150
OSもどきOS
arkw
0
550
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
500
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
3.6k
Featured
See All Featured
Joys of Absence: A Defence of Solitary Play
codingconduct
1
390
Crafting Experiences
bethany
1
180
Art, The Web, and Tiny UX
lynnandtonic
304
22k
sira's awesome portfolio website redesign presentation
elsirapls
0
280
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
160
Side Projects
sachag
455
43k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
200
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
380
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
140
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
360
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
200
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
350
Transcript
FUNCTIONAL PROGRAMMING
WHAT ARE FUNCTIONS?
▸ A relation from a set to a set {(true,
false), (false, true), (false, false)} ▸ One output object for every input {(true, false), (false, true)}
ACTUAL FUNCTIONS
boolean not(boolean b) { return !b; } String hello(String s)
{ return "Hello " + s; }
NOT FUNCTIONS
System.out.println("Hello world"); System.getTimeMillis(); x = x + 1; boolean update(int
j) { i += j; return j + 1; }
... functional programming is a restriction on how we write
programs, but not on what programs we can express. — Rúnar Bjarnason and Paul Chiusano, Functional Programming in Scala, 2014
EQUATIONAL REASONING
main :: IO () main = print $ sum [1,
2, 3] sum :: [Int] -> Int sum = foldl (+) 0 foldl :: (Int -> Int -> Int) -> Int -> [Int] -> Int foldl f z xs = go z xs where go z [] = z go z (x:xs) = go (f z x) xs
main :: IO () main = print $ sum [1,
2, 3] sum :: [Int] -> Int sum xs = go 0 xs where go z [] = z go z (x:xs) = go (z + x) xs
main :: IO () main = print sum' sum' ::
Int sum' = go 0 [1, 2, 3] where go z [] = z go z (x:xs) = go (z + x) xs
main :: IO () main = print sum' sum' ::
Int sum' = go (((0 + 1) + 2) + 3) [] where go z [] = z
main :: IO () main = print sum' sum' ::
Int sum' = (((0 + 1) + 2) + 3)
main :: IO () main = print sum' sum' ::
Int sum' = 6
main :: IO () main = print 6
NOT EQUATIONAL REASONING
val x = { println("Hello"); 1 } x + x
// Hello // 2
{ println("Hello"); 1 } + { println("Hello"); 1 } //
Hello // Hello // 2
PRINCIPLE OF COMPOSITIONALITY
Meaning of a complex statement is the combination of the
meanings of its parts.
COMPROMISING
Can we write partially functional programs?
TOOLS
▸ Haskell ▸ ML ▸ Scala ▸ F#
GO WRITE FUNCTIONS!