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
curry.php
Search
Kazunori Otani
March 29, 2014
Technology
0
690
curry.php
A functional programming using php.
Kazunori Otani
March 29, 2014
Tweet
Share
More Decks by Kazunori Otani
See All by Kazunori Otani
実践OpenTelemetry - Jagu'e'r オブザービリティ分科会 Meetup#2
katzchang
0
810
Kubernetes環境のオブザーバビリティの次の一歩をOpenTelemetryで実現すると何がどうなるの? - CloudNative Days Winter 2024
katzchang
0
280
SLI, SLOとカオスエンジニアリング、そしてオブザーバビリティ SRE Lounge #12
katzchang
4
2.8k
オビザーバビリティ成熟モデル
katzchang
1
4.4k
広告配信におけるパフォーマンス対策、やるかやらないか
katzchang
3
8.3k
高スループット・低レイテンシーなWEBサービスにおけるパフォーマンス対策の現実
katzchang
5
1.3k
モニタリングだいじというはなし
katzchang
1
250
プロビジョニングツールはMakeで決まりだろ
katzchang
12
10k
頑張らないScala
katzchang
2
2.9k
Other Decks in Technology
See All in Technology
The Engineer with a Three-Year Cycle - 2
e99h2121
0
180
AWS Amplify Conference 2026 - 仕様からリリースまで一気通貫生成 AI 時代のフルスタック開発
inariku
3
380
SREの仕事を自動化する際にやっておきたい5つのポイント
jacopen
6
980
書籍執筆での生成AIの活用
sat
PRO
1
210
OCI技術資料 : OS管理ハブ 概要
ocise
2
4.2k
【northernforce#54】SalesforceにおけるAgentforceの位置づけ・事例紹介
yutosatou_kit
0
120
新規事業 toitta におけるAI 機能評価の話 / AI Feature Evaluation in toitta
pokutuna
0
260
AWS Network Firewall Proxyで脱Squid運用⁈
nnydtmg
1
160
ReproでのicebergのStreaming Writeの検証と実運用にむけた取り組み
joker1007
0
430
Git Training GitHub
yuhattor
1
270
さくらのクラウドでのシークレット管理を考える/tamachi.sre#2
fujiwara3
1
220
re:Inventで出たインフラエンジニアが嬉しかったアップデート
nagisa53
4
200
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
28
2.4k
Automating Front-end Workflow
addyosmani
1371
200k
It's Worth the Effort
3n
188
29k
Designing for Performance
lara
610
70k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
280
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
100
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
116
100k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.3k
So, you think you're a good person
axbom
PRO
2
1.9k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
52
Transcript
DVSSZQIQ LZPO@LBP@XFEEJOH !LBU[DIBOH
21)1͖Ͱ͔͢ʁ
!LBU[DIBOH
21)1͖Ͱ͔͢ʁ
ʊਓਓਓਓਓਓਓਓਓਓਓਓਓʊ ʼɹಥવ4USJOH͕*OUʹมΘΔɹʻ ʉ:?:?:?:?:?:?:?:?:?:ʉ
ʮྫ͑ɺ1)1Λආ͚Δʯ
IUUQKBXJLJQFEJBPSHXJLJ&&"&"&"#3BTNVT@-FSEPSG@DSPQQFEKQH
1)1JTBCPVUBTFYDJUJOHBTZPVSUPPUICSVTI :PVVTFJUFWFSZEBZ JUEPFTUIFKPC JUJTBTJNQMFUPPM TPXIBU IUUQFOXJLJRVPUFPSHXJLJ3BTNVT@-FSEPSG
「PHPは、歯ブラシみたいなものですね。 毎日使うものですけど、だから何でしょう?」 IUUQBOPOEIBUFMBCPKQ
None
+BWBͱൺֱ
ແ໊͕ؔ͋Δ ˞+BWBҎલͱͷൺֱ
<?PHP $f = function($a, $b) { return $a + $b;
}; echo $f(2,3); // => 5
<?PHP $f = (function($a, $b) { return $a * $b;
})(2,3); // FAIL!!!
<?PHP $fib = function($x) { return $x < 2 ?
$x : $fib($x-1) + $fib($x-2); })); echo $fib(6); // FAIL!!
ΧϦʔԽ
IUUQTHJTUHJUIVCDPNLBU[DIBOH ˞༵ۚޕޙͰ͢
<?PHP $f = F::curry( function($_) { return $_[0] + $_[1];
}); echo $f->_(2)->_(3)->_();
IUUQTHJTUHJUIVCDPNBKJZPTIJWH CBECEF ˞༵ۚޕޙͰ͢
<?PHP $c = curry( function($a, $b){ return $a + $b;
}); echo $c->_(2)->_(3);
<?PHP function YComb($f) { $yc = curry( function($y, $x) use
($f) { return $f($y($y), $x); }); return $yc($yc); }
<?PHP echo (YComb(curry( function($f, $x){ return $x < 2 ?
$x : $f($x-1) + $f($x-2); })))->_(6);
ʮ͜Εɺࣃϒϥγͱ͍ͯ͠ʹͳΔϨϕϧʯ
-PWFZPVS1)1
None