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 始めました
Search
Yutaka Kinjo
March 02, 2014
Technology
440
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Haskell 始めました
株式会社OCC 金城裕
社内勉強会用
Yutaka Kinjo
March 02, 2014
More Decks by Yutaka Kinjo
See All by Yutaka Kinjo
エンディングまで連れて行くプレイ体験 - unity 1 week 共有会 #7
yutakakinjyo
0
200
調査対象■■■山脈 - unity1week online 共有会 #2 -
yutakakinjyo
0
1.1k
無限跳躍 - unity1week online 共有会 -
yutakakinjyo
2
980
Structure of English
yutakakinjyo
1
140
才能がなくても確実に学習するためのオレオレ学習法
yutakakinjyo
2
2.2k
自動化勉強会 vol.1
yutakakinjyo
1
97
github導入した話.pdf
yutakakinjyo
1
250
Other Decks in Technology
See All in Technology
Kiro Crew 入門 (手を離しても進む仕事) | 目指せ Kiro マスター 11
inariku
PRO
4
580
Active Directory と Entra ID のむむむな関係
murachiakira
PRO
3
1.7k
An Introduction to Context Ontology Accelerator (teaching AI agents what your data means)
inariku
PRO
1
160
Claude Codeで作ったアプリを安全に公開する/Built with Claude Japan 2026
yoshidashingo
0
210
AI時代のエンジニアの情報発信〜個人の発信を組織の力に変える〜
ryo_kawamata
1
7.4k
サボる子はいねぇがー!AgentCoreハーネスの脆弱性に学ぶ、エージェントの入力バリデーション
iwamot
PRO
5
310
顧客合意を取りながら進めるAWSコスト削減の実践
optim
0
140
AI AgentによるEmbedded SREの取り組み
tgidgd
1
360
Kiro 入門 (1 つのエージェントを、どの画面からでも) | 目指せ Kiro マスター 01
inariku
PRO
5
1.2k
プロダクションコードにおける encoding/json から encoding/json/v2 へのスムーズな移行
sansantech
PRO
1
180
Lint の層を組み直した話
bengo4com
3
330
IoTとは〜? 数字で見るSORACOM UG【SORACOM UG Explorer 2026】
soracom
PRO
0
330
Featured
See All Featured
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Odyssey Design
rkendrick25
PRO
2
930
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Statistics for Hackers
jakevdp
799
230k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
3
1.2k
WCS-LA-2024
lcolladotor
0
980
Building AI with AI
inesmontani
PRO
1
1.4k
Everyday Curiosity
cassininazir
0
390
30 Presentation Tips
portentint
PRO
1
460
Scaling GitHub
holman
464
140k
Typedesign – Prime Four
hannesfritz
42
3.2k
Transcript
HASKELL࢝Ί·ͨ͠ גࣜձࣾ OCC Yutaka Kinjo
֓ཁ abstract
•Haskell ͱ •७ਮؔܕݴޠ •cɺjavaɺrubyͳͲͱ͍ͩͿҧ͏ •(ͳʹ͔ɺՄೳੑΛײ͡Δ!!)
•ͨͿΜɺࣾͰৄ͍͠ਓ͍ͳ͍ •Haskell ͷϓϩάϥϛϯάύϥμΠϜڵຯਂ ͍ •ৄ͘͠ͳ͓ͬͯ͘ͱཱͯΔ͔ •ͪΐͬͱͬͯΈͯɺ໘ന͔ͬͨ
͜ΕͰษڧͪ͏
֊ͷܭࢉ factorial
fac 0 = 1 fac n = n * fac(n-1)
main = print (fac 42) 1405006117752879898543142606244511569936384000000000 $ ghc fac.hs $ ./fac
fac 0 = 1 fac n = n * fac(n-1)
main = print (fac 42) 引数のパターン を記述できる fac n = if n == 0 then 1 else n * fac(n-1) if文かかなくてもいい
FizzBuzz
None
ແݶϦετ Infinite list
list = [1,2,3,4] inf_list = [1..]
ԆධՁ lazy evaluation
inf_list = [1..] take 3 inf_list [1,2,3]
inf_list = [1..] take 52 inf_list [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21, 22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,3 9,40,41,42,43,44,45,46,47,48,49,50,51,52]
ΧϦʔԽ currying
•Haskell ͷ࣮ؔ 1 ͭͷҾ͔͠औΒͳ͍ • ෳͷҾΛͱΔ࣮ؔΧϦʔԽ͞Ε͍ͯΔ
max 1 2 > 2 ෳͷҾΛͱΔؔΧϦʔԽ͞Ε͍ͯΔ
(max 1) 2 > 2 ͜͏͡Ό!!
1と引数を比べる関数になる (max 1) 2
これは関数 (max 1)
部分適応された関数 (max 1) デフォルトですでに 1が設定された max
関数名をつけれる let maxOne = (max 1) maxOne 2 > 2
ちょっといじる let maxOne = (max 1.0) maxOne 0.5 > 1.0
࣮༻ྫ application
•৽మॅۚιϦϡʔγϣϯζ • ࣌ՁձܭύοέʔδʮBancMeasureʯ •GREE • ͷKVSσʔλϕʔεͷཧ • ը૾αʔόͷϑϩϯτΤϯυ
·ͱΊ summary
• ؒҧͬͯͨΒ͝ΊΜͳ͍͞ • for จ ࠶ؼͰফ͑ͨ • if จ ύλʔϯϚονͰফ͑ͨ
• ͳΜ͔ɺΧϦʔԽมଶ • ࣮༻ྫ࣮͋Δ • ূ໌ͱ͔Ͱ͖ͦ͏ • (ͳʹ͔ɺՄೳੑΛײ͡Δ!!)
ࢀߟ reference
• http://maoe.hatenadiary.jp/entry/2013/12/12/195322 • http://itpro.nikkeibp.co.jp/article/COLUMN/20130112/449224/ • ॻ੶ : ͍͢͝Haskell ͨͷֶ͘͠΅͏