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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Brian McKenna
May 13, 2014
Programming
68
0
Share
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
2026年のソフトウェア開発を考える(2026/05版) / Software Engineering Scrum Fest Niigata 2026 Edition
twada
PRO
24
14k
Stage 3 Decorators でできること / できないこと / TSKaigi 2026
susisu
1
350
AI時代だからこそ「Bloc」を採用する価値があるのかもしれない
takuroabe
0
210
WebAssembly を読み込むベストプラクティス 2026年春版 / Best Practices for Loading WebAssembly (Spring 2026)
petamoriken
5
1.1k
Sans tests, vos agents ne sont pas fiables
nabondance
0
140
AI Agent と正しく分析するための環境作り
yoshyum
2
560
新規プロダクトを高速で生み出すハーネスエンジニアリング
seanchas116
3
220
AI駆動開発勉強会 広島支部 第一回勉強会 AI駆動開発概要とワークショップ
hayatoshimiu
0
290
プロパティの順序で型推論が壊れる!? TypeScript6.0の修正からContext-Sensitivityの仕組みを追う
bicstone
2
560
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
390
【ディップ|26年新卒研修資料】OpenAPI/Swagger REST API研修
dip_tech
PRO
0
270
Skillは並べた。動かなかった。契約で繋いだ。— 65個のSkillから、自走する開発サイクルへ
junholee
0
680
Featured
See All Featured
Unsuck your backbone
ammeep
672
58k
Fireside Chat
paigeccino
42
3.9k
Bash Introduction
62gerente
615
210k
Facilitating Awesome Meetings
lara
57
6.9k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.1k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
510
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
KATA
mclloyd
PRO
35
15k
Everyday Curiosity
cassininazir
0
210
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!