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
Introduction to Haskell and its REPL
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Filippo Vitale
July 27, 2017
Programming
0
190
Introduction to Haskell and its REPL
Brief and gentle introduction to Haskell and its REPL
Filippo Vitale
July 27, 2017
Tweet
Share
More Decks by Filippo Vitale
See All by Filippo Vitale
Side-effects within the Business Logic core
filippovitale
1
250
Come risolvere un puzzle cripto-aritmetico in Scala
filippovitale
0
190
Product and Sum types
filippovitale
0
160
Solving a CSP with Monad Transformers and a Genetic Algorithm
filippovitale
0
510
AACS Ray Marching
filippovitale
0
210
Let’s Blend some Data Structures
filippovitale
0
150
Lazy Evaluation: Haskell vs. Scala
filippovitale
0
340
Using Eta for what you don't like writing in Scala
filippovitale
0
1.6k
Come risolvere un puzzle crypto-aritmetico in Scala
filippovitale
0
240
Other Decks in Programming
See All in Programming
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
14
7.8k
2026年は Rust 置き換えが流行る! / 20260220-niigata-5min-tech
girigiribauer
0
220
CSC307 Lecture 11
javiergs
PRO
0
590
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
140
PJのドキュメントを全部Git管理にしたら、一番喜んだのはAIだった
nanaism
0
230
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
300
CSC307 Lecture 12
javiergs
PRO
0
460
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
150
日本だけで解禁されているアプリ起動の方法
ryunakayama
0
370
Go 1.26でのsliceのメモリアロケーション最適化 / Go 1.26 リリースパーティ #go126party
mazrean
1
340
atmaCup #23でAIコーディングを活用した話
ml_bear
4
730
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
160
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Faster Mobile Websites
deanohume
310
31k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
73
How GitHub (no longer) Works
holman
316
140k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.8k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Code Reviewing Like a Champion
maltzj
528
40k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
360
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
210
Facilitating Awesome Meetings
lara
57
6.8k
We Are The Robots
honzajavorek
0
190
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