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
200
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
TROCCOで実現するkintone+BigQueryによるオペレーション改善
ssxota
0
170
AI時代のソフトウェア開発でも「人が仕様を書く」から始めよう-医療IT現場での実践とこれから
koukimiura
0
140
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
420
株式会社 Sun terras カンパニーデック
sunterras
0
2.1k
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
9
2.7k
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
170
Go1.26 go fixをプロダクトに適用して困ったこと
kurakura0916
0
360
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
410
TipKitTips
ktcryomm
0
160
Ruby and LLM Ecosystem 2nd
koic
1
470
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
820
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
170
Featured
See All Featured
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
53k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
450
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
KATA
mclloyd
PRO
35
15k
Speed Design
sergeychernyshev
33
1.6k
How to Think Like a Performance Engineer
csswizardry
28
2.5k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
74
Writing Fast Ruby
sferik
630
63k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Claude Code のすすめ
schroneko
67
220k
Designing Powerful Visuals for Engaging Learning
tmiket
0
270
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