2æã«ããã€ã¯ããœãããMVPã®ããã«äž»å¬ããã€ãã³ãã§ãã幎次MVPãµãããã«åå ããŸããããã®æ©äŒã«ãã¹ãã³ãšãã¥ãŒãšãŒã¯ã蚪ããFïŒã«ã€ããŠ2åè¬æŒãããã£ã³ãã«9ã®ã¿ã€ããããã€ããŒã«é¢ããè¬æŒãé²é³ããŸãããä»ã®æŽ»åïŒãããžã®èšªåãFïŒã«ã€ããŠä»ã®äººãšã®ãã£ãããæã®é·ãæŒå¯ãªã©ïŒã«ãé¢ããããç§ã¯ããã€ãã®è°è«ãããããšãã§ããŸããã
ïŒNDAã®äžã§ã¯ãªãïŒ1ã€ã®è°è«ã¯ãCïŒ5.0ã®æ°ããããŒã¯ãŒãã«ã€ããŠã®éåæã¯ãªããã¯ã®è©±ã§ãã-éåæãšåŸ æ©ã LucianãšStephenã¯ãéåæããã°ã©ã ãäœæãããšãã«CïŒéçºè ãçŽé¢ããäžè¬çãªåé¡ã«ã€ããŠè©±ããŸããããã®æçš¿ã§ã¯ãFïŒã®èŠ³ç¹ããããã€ãã®åé¡ãèŠãŠãããŸããäŒè©±ã¯éåžžã«æŽ»çºã§ã誰ããFïŒã®èŽè¡ã®åå¿ã次ã®ããã«èª¬æããŸãã:(
FïŒã§æžããŠããMVPãCââïŒã®ã³ãŒãäŸãèŠããšãã圌ã
ã¯å¥³ã®åã®ããã«ããããç¬ããŸãïŒãªããããèµ·ãã£ãŠããã®ã§ããïŒ FïŒéåæã¢ãã«ïŒFïŒ1.9.2.7ã«ç»å Žã2007幎ã«ãªãªãŒã¹ãããVisual Studio 2008ã«å梱ïŒã䜿çšãããšãããããééãã®å€ããçºçããªãïŒãŸãã¯çºçããå¯èœæ§ãã¯ããã«äœãïŒããšãããããŸããã
èœãšãç©ŽïŒ1ïŒéåæãéåæã§æ©èœããªã
CïŒéåæããã°ã©ãã³ã°ã¢ãã«ã®æåã®ããªãããŒãªåŽé¢ã«çŽæ¥ãžã£ã³ãããŸãããã次ã®äŸãèŠãŠãè¡ãå°å·ãããé åºãæ³åããŠã¿ãŠãã ããïŒããŒã¯ã«ç€ºãããŠããæ£ç¢ºãªã³ãŒãã¯èŠã€ãããŸããã§ããããLucianãåæ§ã®ããšã瀺ããããšãèŠããŠããŸãïŒã
async Task WorkThenWait()
{
Thread.Sleep(1000);
Console.WriteLine("work");
await Task.Delay(1000);
}
void Demo()
{
var child = WorkThenWait();
Console.WriteLine("started");
child.Wait();
Console.WriteLine("completed");
}
ãéå§ãããäœæ¥ãããå®äºããå°å·ããããšæããªããããªãã¯ééã£ãŠããŸããã³ãŒãã¯ãworkãããstartedãããcompletedããåºåããŸããèªåã§è©ŠããŠã¿ãŠãã ãããäœæè ã¯ãïŒWorkThenWaitãåŒã³åºããŠïŒäœæ¥ãéå§ããã¿ã¹ã¯ãå®äºããã®ãåŸ ã¡ãããšèããŠããŸãããåé¡ã¯ãWorkThenWaitãéãèšç®ïŒããã§ã¯Thread.SleepïŒãå®è¡ããããšããå§ãŸãããã®åŸã§ã®ã¿awaitã䜿çšããããšã§ãã
CïŒã§ã¯ãasyncã¡ãœããã®æåã®ã³ãŒããïŒåŒã³åºãå ã®ã¹ã¬ããã§ïŒåæçã«å®è¡ãããŸãããããä¿®æ£ããã«ã¯ãããšãã°ãæåã«await Task.YieldïŒïŒãè¿œå ããŸãã
察å¿ããFïŒã³ãŒã
FïŒã§ã¯ãããã¯åé¡ã§ã¯ãããŸãããFïŒã§éåæã³ãŒããäœæããå Žåãéåæ{âŠ}ãããã¯å ã®ãã¹ãŠã®ã³ãŒãã¯å»¶æãããåŸã§å®è¡ãããŸãïŒæ瀺çã«å®è¡ããå ŽåïŒãäžèšã®CïŒã³ãŒãã¯ãFïŒã®ä»¥äžã«å¯Ÿå¿ããŸãã
let workThenWait() =
Thread.Sleep(1000)
printfn "work done"
async { do! Async.Sleep(1000) }
let demo() =
let work = workThenWait() |> Async.StartAsTask
printfn "started"
work.Wait()
printfn "completed"
æããã«ãworkThenWaité¢æ°ã¯éåæèšç®ã®äžéšãšããŠäœæ¥ïŒThread.SleepïŒãå®è¡ãããé¢æ°ãåŒã³åºããããšãã«å®è¡ãããŸãïŒéåæã¯ãŒã¯ãããŒã®éå§æã§ã¯ãããŸããïŒãFïŒã®äžè¬çãªãã¿ãŒã³ã¯ãé¢æ°ã®æ¬äœå šäœãéåæã§ã©ããããããšã§ããFïŒã§ã¯ã次ã®ããã«èšè¿°ããŸããããã¯æåŸ ã©ããã«æ©èœããŸãã
let workThenWait() = async
{
Thread.Sleep(1000)
printfn "work done"
do! Async.Sleep(1000)
}
èœãšãç©ŽïŒ2ïŒçµæãç¡èŠãã
CïŒéåæããã°ã©ãã³ã°ã¢ãã«ã®å¥ã®åé¡ããããŸãïŒãã®èšäºã¯Lucianã®ã¹ã©ã€ãããçŽæ¥åŒçšããŠããŸãïŒã次ã®éåæã¡ãœãããå®è¡ãããšã©ããªãããæšæž¬ããŸãã
async Task Handler()
{
Console.WriteLine("Before");
Task.Delay(1000);
Console.WriteLine("After");
}
ãåããšè¡šç€ºããã1ç§åŸ ã£ãŠãããåŸããšè¡šç€ºããããšæããŸããïŒéãïŒäž¡æ¹ã®ã¡ãã»ãŒãžã¯ãäžéã®é 延ãªãã«äžåºŠââã«åºåãããŸããåé¡ã¯ãTask.Delayãã¿ã¹ã¯ãè¿ãããšã§ããããããå®äºãããŸã§åŸ ã€ã®ãå¿ããŠããŸããïŒawaitã䜿çšïŒã
察å¿ããFïŒã³ãŒã
ç¹°ãè¿ããŸãããããããFïŒã§ã¯ããã«ééããªãã£ãã§ããããAsync.SleepãåŒã³åºããè¿ãããAsyncãç¡èŠããã³ãŒããç°¡åã«èšè¿°ã§ããŸãã
let handler() = async
{
printfn "Before"
Async.Sleep(1000)
printfn "After"
}
ãã®ã³ãŒããVisualStudioãMonoDevelopããŸãã¯Try FïŒã«è²Œãä»ãããšãããã«èŠåã衚瀺ãããŸãã
èŠåFS0020ïŒãã®åŒã®ã¿ã€ãã¯unitã§ããå¿ èŠããããŸãããã¿ã€ãã¯Async â¹unitâºã§ããåŒã®çµæãç Žæ£ããã«ã¯ignoreã䜿çšããããçµæãååã«ãã€ã³ãããŸãã
èŠåFS0020ïŒãã®åŒã¯ã¿ã€ãunitã§ããå¿ èŠããããŸãããã¿ã€ãAsync â¹unitâºã§ããåŒã®çµæãç Žæ£ããã«ã¯ignoreã䜿çšããããçµæãååã«é¢é£ä»ããŸãã
ã³ãŒããã³ã³ãã€ã«ããŠå®è¡ããããšã¯ã§ããŸãããèŠåãèªããšãåŒãAsyncãè¿ãããšãããããdo ïŒïŒã䜿çšããŠãã®çµæãåŸ ã€å¿ èŠããããŸãã
let handler() = async
{
printfn "Before"
do! Async.Sleep(1000)
printfn "After"
}
èœãšãç©ŽïŒ3ïŒç¡å¹ãè¿ãéåæã¡ãœãã
äŒè©±ã®ããªãã®éšåãéåævoidã¡ãœããã«åããããŸããã async void FooïŒïŒ{âŠ}ãšæžããšãCïŒã³ã³ãã€ã©ã¯voidãè¿ãã¡ãœãããçæããŸããããããå éšã§ã¯ãã¿ã¹ã¯ãäœæããŠå®è¡ããŸããããã¯ãäœæ¥ãå®éã«ãã€è¡ãããããäºæž¬ã§ããªãããšãæå³ããŸãã
ã¹ããŒãã§ã¯ãéåæãã€ããã¿ãŒã³ã®äœ¿çšã«é¢ããŠæ¬¡ã®æšå¥šäºé ãäœæãããŸããã
ïŒå€©åœã®ããã«ãéåæãã€ãã®äœ¿çšãåæ¢ã
ãŠãã ããïŒïŒå ¬å¹³ãæãããã«ãéåæãã€ãã¡ãœããã¯æ¬¡ã®ããšãã§ããããšã«æ³šæããŠãã ãããã€ãã³ããã³ãã©ãŒãäœæãããšãã«åœ¹ç«ã¡ãŸããã€ãã³ããã³ãã©ãŒã¯voidãè¿ãå¿ èŠããããããã¯ã°ã©ãŠã³ãã§ç¶ç¶ããäœæ¥ãéå§ããããšããããããŸãããããããããMVVMã®äžçã§å®éã«åœ¹ç«ã€ãšã¯æããŸããïŒãã ããäŒè°ã§ã®ãã¢ã¯ç¢ºãã«åªããŠããŸãïŒãCïŒã§ã®éåæããã°ã©ãã³ã°ã«é¢ããMSDNMagazineã®èšäºã®
æç²ã䜿çšããŠåé¡ã瀺ããŸãã
async void ThrowExceptionAsync()
{
throw new InvalidOperationException();
}
public void CallThrowExceptionAsync()
{
try
{
ThrowExceptionAsync();
}
catch (Exception)
{
Console.WriteLine("Failed");
}
}
ãã®ã³ãŒãã¯ã倱æããšè¡šç€ºããããšæããŸããïŒãã®èšäºã®ã¹ã¿ã€ã«ããã§ã«ç解ããŠããããšãé¡ã£ãŠããŸã...
å®éãäŸå€ã¯åŠçãããŸããããžã§ãã®éå§åŸãThrowExceptionAsyncãããã«çµäºããäŸå€ãããã¯ã°ã©ãŠã³ãã¹ã¬ããã®ã©ããã«ã¹ããŒãããããã§ãã
察å¿ããFïŒã³ãŒã
ãããã£ãŠãããã°ã©ãã³ã°èšèªã®æ©èœã䜿çšããå¿ èŠããªãå Žåã¯ããããããã®æ©èœãå«ããªãã®ãããããæåã§ããFïŒã§ã¯ãéåævoidé¢æ°ãèšè¿°ã§ããŸãããé¢æ°ã®æ¬äœãéåæ{âŠ}ãããã¯ã§ã©ãããããšãæ»ãã¿ã€ãã¯éåæã«ãªããŸããã¿ã€ã泚éã䜿çšããŠãŠããããå¿ èŠãªå Žåãã¿ã€ãã®äžäžèŽãçºçããŸãã
Async.Startã䜿çšããŠãäžèšã®CïŒã³ãŒãã«äžèŽããã³ãŒããèšè¿°ã§ããŸãã
let throwExceptionAsync() = async {
raise <| new InvalidOperationException() }
let callThrowExceptionAsync() =
try
throwExceptionAsync()
|> Async.Start
with e ->
printfn "Failed"
ããã§ãäŸå€ã¯åŠçãããŸãããããããAsync.Startãæ瀺çã«èšè¿°ããå¿ èŠããããããäœãèµ·ãã£ãŠããã®ãã¯ããæçœã§ããããããªããšãé¢æ°ãéåæãè¿ããŠãããšããèŠåã衚瀺ãããçµæãç¡èŠãããŸãïŒåã®ã»ã¯ã·ã§ã³ãçµæã®ç¡èŠããšåæ§ïŒã
èœãšãç©ŽïŒ4ïŒvoidãè¿ãéåæã©ã ãé¢æ°
éåæã©ã ãé¢æ°ãããªã²ãŒããšããŠã¡ãœããã«æž¡ããšãç¶æ³ã¯ããã«è€éã«ãªããŸãããã®å ŽåãCïŒã³ã³ãã€ã©ã¯ãããªã²ãŒãã®ã¿ã€ãããã¡ãœããã®ã¿ã€ããæšæž¬ããŸããã¢ã¯ã·ã§ã³ããªã²ãŒãïŒãŸãã¯åæ§ã®ãã®ïŒã䜿çšããå Žåãã³ã³ãã€ã©ãŒã¯ããžã§ããéå§ããŠvoidãè¿ãéåævoidé¢æ°ãäœæããŸããFuncããªã²ãŒãã䜿çšããå Žåãã³ã³ãã€ã©ã¯Taskãè¿ãé¢æ°ãçæããŸãã
ããã¯ã«ã·ã¢ã³ã®ã¹ã©ã€ãããã®ãµã³ãã«ã§ãã次ã®ïŒå®å šã«æ£ããïŒã³ãŒãã¯ãã€çµäºããŸããïŒ1ç§ïŒãã¹ãŠã®ã¿ã¹ã¯ã®åŸ æ©ãçµäºããåŸïŒãŸãã¯ããã«çµäºããŸããïŒ
Parallel.For(0, 10, async i =>
{
await Task.Delay(1000);
});
For that accept Actionããªã²ãŒãã®ãªãŒããŒããŒãã®ã¿ãããããšãç¥ããªãéãããã®è³ªåã«çããããšã¯ã§ããŸããããããã£ãŠãã©ã ãé¢æ°ã¯åžžã«éåævoidãšããŠã³ã³ãã€ã«ãããŸãããŸããïŒãããããã€ããŒãã®ïŒè² è·ãè¿œå ããããšã¯é倧ãªå€æŽã«ãªãããšãæå³ããŸãã
察å¿ããFïŒã³ãŒã
FïŒã«ã¯ç¹å¥ãªãéåæã©ã ãé¢æ°ãã¯ãããŸããããéåæèšç®ãè¿ãã©ã ãé¢æ°ãäœæã§ããŸãããã®ãããªé¢æ°ã¯Asyncãè¿ããããvoidãè¿ãããªã²ãŒããæåŸ ããã¡ãœããã«åŒæ°ãšããŠæž¡ãããšã¯ã§ããŸããã次ã®ã³ãŒãã¯ã³ã³ãã€ã«ãããŸããã
Parallel.For(0, 10, fun i -> async {
do! Async.Sleep(1000)
})
ãšã©ãŒã¡ãã»ãŒãžã¯ãé¢æ°ã¿ã€ãint-> Asyncãã¢ã¯ã·ã§ã³ããªã²ãŒããšäºææ§ããªãããšã瀺ããŠããŸãïŒFïŒã§ã¯int-> unitã§ããå¿ èŠããããŸãïŒã
ãšã©ãŒFS0041ïŒã¡ãœããForã«äžèŽãããªãŒããŒããŒãããããŸããã䜿çšå¯èœãªãªãŒããŒããŒãã以äžã«ç€ºããŸãïŒãŸãã¯[ãšã©ãŒãªã¹ã]ãŠã£ã³ããŠã«è¡šç€ºããŸãïŒã
ãšã©ãŒFS0041ïŒForã¡ãœããã®ãªãŒããŒããŒããèŠã€ãããŸããã䜿çšå¯èœãªãªãŒããŒããŒãã以äžã«ïŒãŸãã¯ãšã©ãŒãªã¹ãããã¯ã¹ã«ïŒç€ºããŸãã
äžèšã®CïŒã³ãŒããšåãåäœãåŸãã«ã¯ãæ瀺çã«éå§ããå¿ èŠããããŸããããã¯ã°ã©ãŠã³ãã§éåæã·ãŒã±ã³ã¹ãå®è¡ããå Žåãããã¯Async.StartïŒãŠããããè¿ããã¹ã±ãžã¥ãŒã«ãããŠããããè¿ãéåæèšç®ãå®è¡ããŸãïŒã䜿çšããŠç°¡åã«å®è¡ã§ããŸãã
Parallel.For(0, 10, fun i -> Async.Start(async {
do! Async.Sleep(1000)
}))
ãã¡ãããããæžãããšãã§ããŸãããäœãèµ·ãã£ãŠããã®ãã確èªããã®ã¯éåžžã«ç°¡åã§ããParallel.Forã®ç¹æ§ãšããŠããªãœãŒã¹ã浪費ããŠããããšãç°¡åã«ããããŸããããã¯ãCPUãéäžçã«äœ¿çšããèšç®ïŒéåžžã¯åæé¢æ°ïŒã䞊åã§å®è¡ããããã§ãã
èœãšãç©ŽïŒ5ïŒãã¹ãã¿ã¹ã¯
ã«ã·ã¢ã³ã¯èŽè¡ã®äººã ã®ç¥æ§ããã¹ãããããã ãã«ãã®ç³ãå«ãããšæããŸãããããã«ãããŸããåé¡ã¯ã次ã®ã³ãŒããã³ã³ãœãŒã«ãžã®2ã€ã®ãã³éã§1ç§éåŸ æ©ãããã©ããã§ãã
Console.WriteLine("Before");
await Task.Factory.StartNew(
async () => { await Task.Delay(1000); });
Console.WriteLine("After");
ãŸã£ããæå€ãªããšã«ããããã®çµè«ã®éã«é ãã¯ãããŸãããããã¯ã©ã®ããã«å¯èœã§ããïŒ StartNewã¡ãœããã¯ããªã²ãŒããåãåããã¿ã¹ã¯ãè¿ããŸããããã§ãTã¯ããªã²ãŒãã«ãã£ãŠè¿ãããã¿ã€ãã§ãããã®å Žåãããªã²ãŒãã¯Taskãè¿ããããçµæãšããŠTaskãååŸããŸãã awaitã¯ãå€éšã¿ã¹ã¯ãå®äºããã®ãåŸ ã€ã ãã§ïŒå éšã¿ã¹ã¯ãããã«è¿ããŸãïŒãå éšã¿ã¹ã¯ã¯ç¡èŠãããŸãã
CïŒã§ã¯ãããã¯StartNewã®ä»£ããã«Task.Runã䜿çšããããšã«ãã£ãŠïŒãŸãã¯ã©ã ãé¢æ°ã§async / awaitãåé€ããããšã«ãã£ãŠïŒä¿®æ£ã§ããŸãã
ãã®ãããªãã®ãFïŒã§æžããŸããïŒTask.Factory.StartNewé¢æ°ãšéåæãããã¯ãè¿ãã©ã ãé¢æ°ã䜿çšããŠãéåæãè¿ãã¿ã¹ã¯ãäœæã§ããŸããã¿ã¹ã¯ãå®äºããã®ãåŸ ã€ã«ã¯ãAsync.AwaitTaskã䜿çšããŠã¿ã¹ã¯ãéåæå®è¡ã«å€æããå¿ èŠããããŸããããã¯ãAsync <Async>ãååŸããããšãæå³ããŸãã
async {
do! Task.Factory.StartNew(fun () -> async {
do! Async.Sleep(1000) }) |> Async.AwaitTask }
ç¹°ãè¿ããŸããããã®ã³ãŒãã¯ã³ã³ãã€ã«ãããŸãããåé¡ã¯ããããããšã§ãïŒå³åŽã«Asyncãå¿ èŠã§ãããå®éã«ã¯Async <Async>ãåãåããŸããèšãæããã°ãçµæãåã«ç¡èŠããããšã¯ã§ããŸãããããã«ã€ããŠæ瀺çã«äœããè¡ãå¿ èŠããã
ãŸãïŒAsync.Ignoreã䜿çšããŠCïŒã®åäœãåçŸã§ããŸãïŒããšã©ãŒã¡ãã»ãŒãžã¯åã®ã¡ãã»ãŒãžã»ã©æ確ã§ã¯ãªããããããŸããããããã¯äžè¬çãªèããäžããŸãïŒ
ãšã©ãŒFS0001ïŒãã®åŒã¯ã¿ã€ãAsync â¹unitâºã§ãããšäºæ³ãããŠããŸããããããã§ã¯ã¿ã€ãunitããããŸã
ãšã©ãŒFS0001ïŒéåæåŒ 'ãŠããã'ãå¿ èŠã§ãããŠãããã¿ã€ããååšããŸã
èœãšãç©ŽïŒ6ïŒéåæãæ©èœããªã
ããã¯ãã«ã·ã¢ã³ã®ã¹ã©ã€ãããã®å¥ã®åé¡ã®ããã³ãŒãã§ããä»åã¯ãåé¡ã¯éåžžã«åçŽã§ãã次ã®ã¹ããããã¯ãéåæFooAsyncã¡ãœãããå®çŸ©ããããããã³ãã©ãŒããåŒã³åºããŸãããã³ãŒãã¯éåæã§å®è¡ãããŸããã
async Task FooAsync()
{
await Task.Delay(1000);
}
void Handler()
{
FooAsync().Wait();
}
åé¡ãèŠã€ããã®ã¯ç°¡åã§ã-FooAsyncïŒïŒãšåŒã³ãŸããWaitïŒïŒãããã¯ãã¿ã¹ã¯ãäœæããŠãããWaitã䜿çšããŠãå®äºãããŸã§ããã°ã©ã ããããã¯ããããšãæå³ããŸããã¿ã¹ã¯ãéå§ãããã ããªã®ã§ãWaitãåé€ããã ãã§åé¡ã解決ããŸãã
åãã³ãŒããFïŒã§èšè¿°ã§ããŸãããéåæã¯ãŒã¯ãããŒã¯.NETã¿ã¹ã¯ïŒå ã ã¯CPUããŠã³ãèšç®çšã«èšèšãããïŒã䜿çšããã代ããã«Waitã«ãã³ãã«ãããŠããªãFïŒéåæã¿ã€ãã䜿çšããŸããããã¯ã次ã®ããã«æžãå¿ èŠãããããšãæå³ããŸãã
let fooAsync() = async {
do! Async.Sleep(1000) }
let handler() =
fooAsync() |> Async.RunSynchronously
ãã¡ããããã®ãããªã³ãŒãã¯å¶ç¶ã«æžãããå¯èœæ§ããããŸãããéåæã®ç Žæã®åé¡ã«çŽé¢ããå Žåãã³ãŒããRunSynchronouslyãåŒã³åºãããšã«ç°¡åã«æ°ä»ãã®ã§ãäœæ¥ã¯-ååã瀺ãããã«-åæçã«è¡ãããŸãã
æŠèŠ
ãã®èšäºã§ã¯ãCïŒã®éåæããã°ã©ãã³ã°ã¢ãã«ãäºæããªãæ¹æ³ã§åäœãã6ã€ã®ã±ãŒã¹ãèŠãŠããŸããããããã®ã»ãšãã©ã¯ãMVPãµãããã§ã®ã«ã·ã¢ã³ãšã¹ãã£ãŒãã³ã®äŒè©±ã«åºã¥ããŠããã®ã§ãããããèœãšãç©Žã®èå³æ·±ããªã¹ããæäŸããŠãããäž¡æ¹ã«æè¬ããŸãïŒ
FïŒã®å Žåãéåæã¯ãŒã¯ãããŒã䜿çšããŠãæãè¿ãé¢é£ã³ãŒãã¹ãããããèŠã€ããããšããŸãããã»ãšãã©ã®å ŽåãFïŒã³ã³ãã€ã©ã¯èŠåãŸãã¯ãšã©ãŒãçºè¡ããŸãããŸãã¯ãããã°ã©ãã³ã°ã¢ãã«ã«åãã³ãŒããè¡šçŸããïŒçŽæ¥ã®ïŒæ¹æ³ããããŸãããããã¯ã以åã®ããã°æçš¿ã§ç§ãè¡ã£ã声æãè£ä»ããŠãããšæããŸãããFïŒããã°ã©ãã³ã°ã¢ãã«ã¯ãæ©èœçïŒå®£èšçïŒããã°ã©ãã³ã°èšèªã«ééããªãé©ããŠããããã§ãããŸããäœãèµ·ãã£ãŠããã®ããæšè«ãããããªããšæããŸããã
æåŸã«ããã®èšäºã¯ãCïŒ:-)ã®éåææ§ã«å¯Ÿããç Žå£çãªæ¹å€ãšããŠç解ãããã¹ãã§ã¯ãããŸããã CïŒã®èšèšããããšåãååã«åŸãçç±ãå®å šã«ç解ããŠããŸã-CïŒã®å ŽåãïŒåå¥ã®éåæã®ä»£ããã«ïŒã¿ã¹ã¯ã䜿çšããããšãçã«ããªã£ãŠããŸããããã«ã¯å€ãã®çµæããããŸãããããŠãç§ã¯ä»ã®è§£æ±ºçã®çç±ãç解ããããšãã§ããŸã-ããã¯ããããéåæããã°ã©ãã³ã°ãCïŒã«çµ±åããããã®æè¯ã®æ¹æ³ã§ãããããåæã«ãFïŒã¯ããè¯ãä»äºãããŠãããšæããŸã-éšåçã«ã¯ãã®åæèœåã®ããã§ãããããéèŠãªã®ã¯FïŒãšãŒãžã§ã³ãã®ãããªã¯ãŒã«ãªã¢ããªã³ã®ããã§ããããã«ãFïŒã®éåææ§ã«ãåé¡ããããŸãïŒæãäžè¬çãªééãã¯ããªãŒã¯ãåé¿ããããã«ãdoïŒã§ã¯ãªãreturnïŒã䜿çšããå¿ èŠãããããšã§ãïŒããããã¯å¥ã®ããã°æçš¿ã®ãããã¯ã§ãã
PS翻蚳è ããããã®èšäºã¯2013幎ã«æžãããŸãããããã·ã¢èªã«ç¿»èš³ããã®ã«ååèå³æ·±ãé¢é£æ§ãããããã«æããŸãããããã¯Habréãžã®ç§ã®æåã®æçš¿ãªã®ã§ãæ¿ãã蹎ããªãã§ãã ããã