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
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
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
370
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
ActionController meets Protocol Buffers
sorah
1
720
残高管理から台帳サービスへの進化
artoy
1
210
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
10
5.7k
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
4
1k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
440
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
150
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
3
1.3k
PyConTW 2026 - AI Coding 不只是工具升級, 區域醫院醫療資訊系統協作開發與資訊團隊轉型實踐
cclai999
0
200
Vue Fes Japan の “作る側”に関わってみて
naokihaba
1
190
sbt 2.0: takeoff
eed3si9n
0
170
ChromeでローカルLLM
ryu1013
0
160
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
2
200
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
699
190k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
340
Game over? The fight for quality and originality in the time of robots
wayneb77
1
310
Large-scale JavaScript Application Architecture
addyosmani
516
110k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
Leo the Paperboy
mayatellez
10
2.4k
Believing is Seeing
oripsolob
1
250
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Evolving SEO for Evolving Search Engines
ryanjones
0
330
Exploring anti-patterns in Rails
aemeredith
4
540
The Curious Case for Waylosing
cassininazir
1
580
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