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
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
230
Come risolvere un puzzle cripto-aritmetico in Scala
filippovitale
0
180
Product and Sum types
filippovitale
0
150
Solving a CSP with Monad Transformers and a Genetic Algorithm
filippovitale
0
450
AACS Ray Marching
filippovitale
0
200
Let’s Blend some Data Structures
filippovitale
0
140
Lazy Evaluation: Haskell vs. Scala
filippovitale
0
320
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
生成AIを活用したリファクタリング実践 ~コードスメルをなくすためのアプローチ
raedion
0
140
AIエージェントでのJava開発がはかどるMCPをAIを使って開発してみた / java mcp for jjug
kishida
4
790
Phronetic Team with AI - Agile Japan 2025 closing
hiranabe
2
680
スタートアップを支える技術戦略と組織づくり
pospome
8
12k
TypeScript 5.9 で使えるようになった import defer でパフォーマンス最適化を実現する
bicstone
1
500
複数チーム並行開発下でのコード移行アプローチ ~手動 Codemod から「生成AI 活用」への進化
andpad
0
190
アーキテクチャと考える迷子にならない開発者テスト
irof
9
3.3k
Flutterチームから作る組織の越境文化
findy_eventslides
0
600
CloudflareのSandbox SDKを試してみた
syumai
0
180
2025 컴포즈 마법사
jisungbin
0
150
仕様がそのままテストになる!Javaで始める振る舞い駆動開発
ohmori_yusuke
8
4.7k
Chart.jsで長い項目を表示するときのハマりどころ
yumechi
0
160
Featured
See All Featured
Writing Fast Ruby
sferik
630
62k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
4 Signs Your Business is Dying
shpigford
186
22k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
Being A Developer After 40
akosma
91
590k
Site-Speed That Sticks
csswizardry
13
970
Building an army of robots
kneath
306
46k
The Pragmatic Product Professional
lauravandoore
36
7k
Designing for Performance
lara
610
69k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
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