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
99
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
590
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
ふつうのRubyist、ちいさなデバイス、大きな一年 / Ordinary Rubyists, Tiny Devices, Big Year
chobishiba
1
430
エンジニアの「手元の自動化」を加速するn8n 2026.02.27
symy2co
0
140
New in Go 1.26 Implementing go fix in product development
sunecosuri
0
430
AI時代でも変わらない技術コミュニティの力~10年続く“ゆるい”つながりが生み出す価値
n_takehata
2
720
Go Conference mini in Sendai 2026 : Goに新機能を提案し実装されるまでのフロー徹底解説
yamatoya
0
570
モジュラモノリスにおける境界をGoのinternalパッケージで守る
magavel
0
3.5k
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
180
AWS Infrastructure as Code の新機能 2025 総まとめ 〜SA 4人による怒涛のデモ祭り〜
konokenj
10
3.3k
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
840
株式会社 Sun terras カンパニーデック
sunterras
0
2.1k
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
900
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
8k
Featured
See All Featured
Are puppies a ranking factor?
jonoalderson
1
3.1k
Paper Plane
katiecoart
PRO
0
48k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
390
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
210
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
120
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Designing Experiences People Love
moore
143
24k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
75
Game over? The fight for quality and originality in the time of robots
wayneb77
1
130
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
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