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
Haskell Introduction
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Seiya
July 14, 2018
Technology
0
110
Haskell Introduction
プログラミング言語のHaskellの紹介スライドです。
JOI2017夏季セミナーで作った資料な気がします。
Seiya
July 14, 2018
Tweet
Share
More Decks by Seiya
See All by Seiya
ATProtocol ざっくり概要把握してみた @ DWeb Tokyo Meetup #2
silmin_
0
33
おうちGitLabのススメ
silmin_
3
1.7k
Git入門
silmin_
32
21k
暗号について
silmin_
0
180
LinuxCommand入門
silmin_
0
390
LinuxCommand入門2
silmin_
0
280
Webについて
silmin_
3
200
ネットワークとは
silmin_
0
250
コンピュータとは|初心者向け資料
silmin_
1
190
Other Decks in Technology
See All in Technology
Mitigating geopolitical risks with local-first software and atproto
ept
0
120
決済サービスを支えるElastic Cloud - Elastic Cloudの導入と推進、決済サービスのObservability
suzukij
2
660
進化するBits AI SREと私と組織
nulabinc
PRO
1
250
フロントエンド刷新 4年間の軌跡
yotahada3
0
500
Windows ファイル共有(SMB)を再確認する
murachiakira
PRO
0
180
NewSQL_ ストレージ分離と分散合意を用いたスケーラブルアーキテクチャ
hacomono
PRO
4
400
Everything Claude Code を眺める
oikon48
12
7.9k
[JAWSDAYS2026]Who is responsible for IAM
mizukibbb
0
900
生成AI活用でQAエンジニアにどのような仕事が生まれるか/Support Required of QA Engineers for Generative AI
goyoki
1
270
Oracle Cloud Infrastructure IaaS 新機能アップデート 2025/12 - 2026/2
oracle4engineer
PRO
0
170
AWSの資格って役に立つの?
tk3fftk
2
370
複数クラスタ運用と検索の高度化:ビズリーチにおけるElastic活用事例 / ElasticON Tokyo2026
visional_engineering_and_design
0
170
Featured
See All Featured
Speed Design
sergeychernyshev
33
1.6k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.4k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.5k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
78
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
200
The SEO identity crisis: Don't let AI make you average
varn
0
420
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
What's in a price? How to price your products and services
michaelherold
247
13k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
Building Adaptive Systems
keathley
44
3k
Google's AI Overviews - The New Search
badams
0
930
Transcript
Haskell Introduction mina @silmin_
はじめに 「純粋関数型データ構造」という本で純粋関数型(ryを学んだ () これは ➢ 参照透過性 ➢ 永続性 ➢ 副作用のNASA
➢ なんでも関数 ➢ 簡潔かつ混沌() などが特徴(らしい) 今回はHaskellで実装した
Haskell とは 芸術
型宣言 Haskellは美しい data Color = Red | Blue | Yellow
toJpn :: Color -> String toJpn Red = “aka” toJpn Blue = “ao” toJpn Yellow = “ki” main = print $ toJpn Red パターンマッチ 関数実行 & 出力 enum Color { Red, Blue, Yellow };
関数のいろいろ 関数名 引数1 引数2.......で呼び出し temp a b -> a `temp` b とも書ける (
1 + ) , ( 5 * ) : 一引数関数 ( 1 + ) . ( 5 * ) : 関数合成 ( 5倍して1足す関数) f x y = print $ gcd x y f x = print . gcd x f = (print .) . gcd
実行してみる 関数合成
二分探索木(木の定義) data Tree a = Leaf | Node (Tree a)
a (Tree a) Leaf - 末端ノードの先にいる 実質虚無 末 Node - ただのノード 子を持ってる a ... ... 葉 葉
二分探索木(search関数) search::Ord a => Tree a -> a -> Bool
search Leaf b = False search (Node tl a tr) b = if b < a then search tl b else if b > a then search tr b else True 型宣言 パターンマッチ
最後に 興味を持った方は「Haskell Platform」で検索 ※UNIX / Mac の方はパッケージがあるのでinstallしましょう Haskellには光と闇が存在します
Haskell とは 芸術
Thank you for listening !!!