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
Haskell - A brief introduction
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
MetaBroadcast
June 13, 2012
Programming
0
98
Haskell - A brief introduction
Talk given by Fred van den Driessche on 13-06-2012 at MetaBroadcast.
MetaBroadcast
June 13, 2012
Tweet
Share
More Decks by MetaBroadcast
See All by MetaBroadcast
PhotoGlut
metabroadcast
2
380
Machine learning: boldly going where Twitter's APIs don't
metabroadcast
0
140
monitoring: it gets better
metabroadcast
1
580
The ABCs of MetaBroadcast APIs
metabroadcast
0
220
APIs for app developers
metabroadcast
1
160
Polishing Varnish
metabroadcast
0
830
Atlas - 3.0 to 4.0
metabroadcast
0
250
Atlas - owl vs deer
metabroadcast
0
250
Storm - an overview
metabroadcast
0
130
Other Decks in Programming
See All in Programming
2026/02/04 AIキャラクター人格の実装論 口 調の模倣から、コンテキスト制御による 『思想』と『行動』の創発へ
sr2mg4
0
680
文字コードの話
qnighy
43
17k
今更考える「単一責任原則」 / Thinking about the Single Responsibility Principle
tooppoo
3
1.3k
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
110
CSC307 Lecture 10
javiergs
PRO
1
690
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
190
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
300
Premier Disciplin for Micro Frontends Multi Version/ Framework Scenarios @OOP 2026, Munic
manfredsteyer
PRO
0
200
Raku Raku Notion 20260128
hareyakayuruyaka
0
430
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
450
猫の手も借りたい!ので AIエージェント猫を作って社内に放した話 Claude Code × Container Lambda の Slack Bot "DevNeko"
naramomi7
0
240
Go 1.26でのsliceのメモリアロケーション最適化 / Go 1.26 リリースパーティ #go126party
mazrean
1
330
Featured
See All Featured
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
65
Become a Pro
speakerdeck
PRO
31
5.8k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
970
The browser strikes back
jonoalderson
0
750
BBQ
matthewcrist
89
10k
Making Projects Easy
brettharned
120
6.6k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
So, you think you're a good person
axbom
PRO
2
1.9k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The agentic SEO stack - context over prompts
schlessera
0
680
Transcript
Haskell A Brief Introduction
Pure Functional Lists Lazy • • •
Built-in Types Numbers: 1, 1.234 Booleans: True, False Characters/Strings: 'a',
"asdf" Lists: [1,2,3] Tuples:("jim", 25) • • • • •
Functions double x = 2 * x > double 5
10
Control max x y = if x > y then
x else y max x y | x > y = x | otherwise y
Lists [] 1 : [2, 3] = [1, 2, 3]
[1, 2] ++ [3, 4] = [1, 2, 3, 4] head [1, 2, 3] = 1 tail [1, 2, 3] = [2, 3]g • • • • •
Pattern Matching dblAll [] = [] dblAll (x:xs)= double x
: dblAll xs
Higher-order functions > map double [1, 2, 3] [2, 4,
6] map f [] = [] map f (x:xs) = f x : map f xs
Function Types > :t double double :: Num a =>
a -> a > :t (*) (*) :: Num a => a -> a -> a > :t map map :: (a -> b) -> [a] -> [b]
Currying > :t (*) (*) :: Num a => a
-> a -> a > :t (2*) (2*) :: Num a => a -> a double = 2* dblAll = map (2*)
Data Types data Bool = True | False data Maybe
a = Just a | Nothing data Either a b = Left a | Right b data Tree a = Empty | Node a (Tree a) (Tree b ) • • • •
yesOrNo True = "yes" yesOrNo False = "no" traverse Empty
= [] traverse (Node v l r) = (traverse l) ++ v : traverse r
Laziness fib c n = c : fib n (c
+ n) > fib 0 1 [0, 1, 1, 2, 3, 5, 8, 13, 21 ... > take 5 (fib 0 1) [0, 1, 1, 2, 3]
Laziness > (fib 0 1) !! 900 54877108839480000051413673948383714443800