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
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
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Haskell Introduction
プログラミング言語のHaskellの紹介スライドです。
JOI2017夏季セミナーで作った資料な気がします。
Seiya
July 14, 2018
More Decks by Seiya
See All by Seiya
ATProtocol ざっくり概要把握してみた @ DWeb Tokyo Meetup #2
silmin_
0
84
おうちGitLabのススメ
silmin_
4
2k
Git入門
silmin_
38
27k
暗号について
silmin_
0
220
LinuxCommand入門
silmin_
0
430
LinuxCommand入門2
silmin_
0
310
Webについて
silmin_
3
230
ネットワークとは
silmin_
0
290
コンピュータとは|初心者向け資料
silmin_
1
240
Other Decks in Technology
See All in Technology
spanner-autoscalerに学ぶ CRD設計パターン 〜自動化と緊急時対応を両立する Kubernetesコントローラーの作り方〜
tkuchiki
0
220
スキルを作る、その前に!複数人で使われるスキルを 作るためのプロセス
junkifurukawa
1
150
生成AIと進める探索的データ分析(2026.10.03 第122回Tokyo.R勉強会)
tatamiya
0
400
DORA_Metrics.pdf
wagnerfusca
1
140
私の推しは「聞いてから進む」AIです -AI-DLCに一人でアプリを作らせた話
yama3133
0
150
VS Code × GitHub Copilot での Fabric 開発
ryomaru0825
1
210
IR Today: Theory, Practice, and Agents
dtunkelang
0
310
AWS FinOps Agent 結局何が得意なの?
siromi
0
230
大阪オフィスに Unitree Go2 がやってきたので Physical AI やってみた
dafujii
0
210
営業オントロジーの作り方と、エージェントからの辿り方 ── ナレッジワークの現場から
kworkdev
PRO
1
220
20260930_Gemma4_Hands-on
tsho
0
200
Snowflake Horizon Catalog と Apache Iceberg で作る オープンなデータ基盤
kitagawaz
0
370
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
690
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.7k
Optimising Largest Contentful Paint
csswizardry
37
4k
Leo the Paperboy
mayatellez
10
2.3k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Become a Pro
speakerdeck
PRO
31
6.3k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
How to Talk to Developers About Accessibility
jct
2
560
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
200
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 !!!