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
790
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.2k
高スループット・低レイテンシーな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
20251219 OpenIDファウンデーション・ジャパン紹介 / OpenID Foundation Japan Intro
oidfj
0
560
Strands Agents × インタリーブ思考 で変わるAIエージェント設計 / Strands Agents x Interleaved Thinking AI Agents
takanorig
6
2.3k
Snowflake Industry Days 2025 Nowcast
takumimukaiyama
0
140
2025年のデザインシステムとAI 活用を振り返る
leveragestech
0
480
なぜ あなたはそんなに re:Invent に行くのか?
miu_crescent
PRO
0
230
Amazon Quick Suite で始める手軽な AI エージェント
shimy
2
2.1k
Building Serverless AI Memory with Mastra × AWS
vvatanabe
1
750
Strands AgentsとNova 2 SonicでS2Sを実践してみた
yama3133
1
2.1k
202512_AIoT.pdf
iotcomjpadmin
0
150
ECS_EKS以外の選択肢_ROSA入門_.pdf
masakiokuda
1
110
Oracle Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
2
450
Authlete で実装する MCP OAuth 認可サーバー #CIMD の実装を添えて
watahani
0
260
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Rails Girls Zürich Keynote
gr2m
95
14k
What's in a price? How to price your products and services
michaelherold
246
13k
From π to Pie charts
rasagy
0
94
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.2k
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
250
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.7k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.2k
Scaling GitHub
holman
464
140k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
1
880
Six Lessons from altMBA
skipperchong
29
4.1k
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