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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Filippo Vitale
July 27, 2017
Programming
210
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
Transcript
18 slides
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
More Decks by Filippo Vitale
See All by Filippo Vitale
Side-effects within the Business Logic core
filippovitale
1
300
Come risolvere un puzzle cripto-aritmetico in Scala
filippovitale
0
220
Product and Sum types
filippovitale
0
200
Solving a CSP with Monad Transformers and a Genetic Algorithm
filippovitale
0
540
AACS Ray Marching
filippovitale
0
250
Let’s Blend some Data Structures
filippovitale
0
180
Lazy Evaluation: Haskell vs. Scala
filippovitale
0
380
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
Going Full Circle with Virtual Graphs and Relational Databases
michaelsimons
1
110
Beyond Chatbots: Agentic UI with Open Standards @W-JAX 2026, München
manfredsteyer
PRO
0
130
Lean で手続き的プログラム の証明が書けるようになった
inoueasei
8
3k
自宅サーバはどこまで再現できるのか - Proxmox VE上のVM環境をIaCとバックアップで戻してみた
youto
0
450
Proxmox x Talos Linux x Terraform で実現するなんかいい感じの Kubernetes クラスタ / A Sleek Kubernetes Cluster Powered by Proxmox, Talos Linux, and Terraform
nnaka2992
0
310
はじめてのKubernetesコントリビューション
nasa9084
0
330
Math.sumPreciseから学ぶ、ECMAScript仕様の数値の種類
syumai
0
310
AI駆動TDD ― 2026年10月版
hrmstrsmgs
0
110
LLM 101: Exploring LLMs, Starting with Tokens.
dalinaum
0
120
SONY CISC-NEWS NWS-1750 + NWB-225 ハードウェアメンテとフレームバッファカラー対応 / KOF2026
tsutsui
0
140
読みやすい!と評判(?)の発表の準備にかける私のこだわり
shoheimitani
0
170
Agentic AI with the Power of Jakarta EE
ivargrimstad
0
200
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
464
34k
We Have a Design System, Now What?
morganepeng
55
8.4k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.3k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
The Curse of the Amulet
leimatthew05
4
17k
Making the Leap to Tech Lead
cromwellryan
135
10k
Prompt Engineering for Job Search
mfonobong
0
610
WENDY [Excerpt]
tessaabrams
15
41k
Unsuck your backbone
ammeep
672
58k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
290
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k