Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Haskell - A brief introduction
Search
MetaBroadcast
June 13, 2012
Programming
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Haskell - A brief introduction
Talk given by Fred van den Driessche on 13-06-2012 at MetaBroadcast.
MetaBroadcast
June 13, 2012
More Decks by MetaBroadcast
See All by MetaBroadcast
PhotoGlut
metabroadcast
2
400
Machine learning: boldly going where Twitter's APIs don't
metabroadcast
0
160
monitoring: it gets better
metabroadcast
1
610
The ABCs of MetaBroadcast APIs
metabroadcast
0
270
APIs for app developers
metabroadcast
1
170
Polishing Varnish
metabroadcast
0
850
Atlas - 3.0 to 4.0
metabroadcast
0
270
Atlas - owl vs deer
metabroadcast
0
270
Storm - an overview
metabroadcast
0
150
Other Decks in Programming
See All in Programming
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
4.8k
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
200
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
370
Modernizing iOS Apps
seyfoyun
0
150
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
16
8.9k
Engineering Biometric UX Across Android Versions | DroidKnights 2026
ryunen344
1
190
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
170
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
250
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
320
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
2k
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
330
はじめてのPLATEAU
nokonoko1203
1
630
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
600
The Cult of Friendly URLs
andyhume
79
7.1k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
340
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Designing Powerful Visuals for Engaging Learning
tmiket
1
650
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.2k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
620
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