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
Introduction to Haskell and its REPL
Search
Filippo Vitale
July 27, 2017
Programming
200
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Introduction to Haskell and its REPL
Brief and gentle introduction to Haskell and its REPL
Filippo Vitale
July 27, 2017
More Decks by Filippo Vitale
See All by Filippo Vitale
Side-effects within the Business Logic core
filippovitale
1
290
Come risolvere un puzzle cripto-aritmetico in Scala
filippovitale
0
210
Product and Sum types
filippovitale
0
190
Solving a CSP with Monad Transformers and a Genetic Algorithm
filippovitale
0
530
AACS Ray Marching
filippovitale
0
240
Let’s Blend some Data Structures
filippovitale
0
180
Lazy Evaluation: Haskell vs. Scala
filippovitale
0
360
Using Eta for what you don't like writing in Scala
filippovitale
0
1.7k
Come risolvere un puzzle crypto-aritmetico in Scala
filippovitale
0
270
Other Decks in Programming
See All in Programming
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
Workers Cache を知る
syumai
0
340
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
350
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
8
5.5k
Androidだけじゃない、DroidKaigiで広がった私の技術スタック
akkeylab
0
120
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
350
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
480
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
440
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
740
AWSに止められる覚悟してますか?
morizo_1984
2
510
iOSDC2026登壇資料.pdf
riofujimon
0
210
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
331
22k
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
3
4.3k
How to Think Like a Performance Engineer
csswizardry
28
2.9k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
300
GraphQLとの向き合い方2022年版
quramy
50
15k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
430
The Limits of Empathy - UXLibs8
cassininazir
1
700
Odyssey Design
rkendrick25
PRO
2
860
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
590
KATA
mclloyd
PRO
35
16k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
550
Transcript
Introduction to Haskell and its REPL
None
$ docker run -it --rm \ mitchty/alpine-ghc ghci 1.
$ docker run -it --rm \ mitchty/alpine-ghc ghci docker pull
mitchty/alpine-ghc:latest 1.
▪ 1 + 2 ▪ 2^1000 ▪ (+) 1 2
▪ :t (+) ▪ :i (+) So... what now?
▪ (+) :: a -> a -> a Functions Everywhere
▪ [1, 2, 3] ▪ [1..] ▪ [1..10] ▪ [1,
1.25 .. 4.0] List
▪ (:) :: a -> [a] -> [a] ▪ (++)
:: [a] -> [a] -> [a] List
▪ head :: [a] -> a ▪ tail :: [a]
-> [a] ▪ take :: Int -> [a] -> [a] ▪ drop :: Int -> [a] -> [a] List
▪ map :: (a -> b) -> [a] -> [b]
▪ filter :: (a -> Bool) -> [a] -> [a] List
▪ :t <espression> ← type inspection ▪ :i <espression> ←
info ▪ :l <filename> ← load .hs file ▪ :r ← reload files GHCi
BYO Editor ▪ Spacemacs http://spacemacs.org/ ▪ Atom https://atom.io/ ▪ Visual
Studio https://code.visualstudio.com/
$ docker run -it --rm \ -v `pwd`:/root \ mitchty/alpine-ghc
ghci 2.
Wanna try an exercise together? Let’s reverse a list
Theorems for free! – Philip Walder, 1989 https://people.mpi-sws.org/~dreyer/tor/papers/wadler.pdf
▪ foo :: a -> a ▪ foo2 :: b
-> a ▪ foo3 :: a -> b -> a What’s the only possible implementation of `foo`?
None
Thanks! Any questions? @filippovitale