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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
おうちGitLabのススメ
silmin_
3
1.5k
Git入門
silmin_
31
20k
暗号について
silmin_
0
170
LinuxCommand入門
silmin_
0
370
LinuxCommand入門2
silmin_
0
260
Webについて
silmin_
3
180
ネットワークとは
silmin_
0
230
コンピュータとは|初心者向け資料
silmin_
1
180
ビットについて|入門者向け資料
silmin_
0
200
Other Decks in Technology
See All in Technology
re:Inventで見つけた「運用を捨てる」技術。
ezaki
1
150
Databricks Free Edition講座 データサイエンス編
taka_aki
0
230
フロントエンド開発者のための「厄払い」
optim
0
180
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
17k
AI開発をスケールさせるデータ中心の仕組みづくり
kzykmyzw
0
180
AIとともに歩む情報セキュリティ / Information Security with AI
kanny
4
2.6k
DatabricksホストモデルでAIコーディング環境を構築する
databricksjapan
0
190
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
72k
Riverpod3.xで実現する実践的UI実装
fumiyasac0921
2
340
2人で作ったAIダッシュボードが、開発組織の次の一手を照らした話― Cursor × SpecKit × 可視化の実践 ― Qiita AI Summit
noalisaai
0
180
セキュリティ はじめの一歩
nikinusu
0
990
AI開発の落とし穴 〜馬には乗ってみよAIには添うてみよ〜
sansantech
PRO
10
5.1k
Featured
See All Featured
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
55
49k
WENDY [Excerpt]
tessaabrams
9
36k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
710
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
Ethics towards AI in product and experience design
skipperchong
2
180
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
810
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
300
Designing for Performance
lara
610
70k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.2k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
570
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
130
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
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 !!!