OS X 10.6 以éã® xcode ã§ã¯ Objective-C ã« Blocks ã¨ããã·ã³ã¿ãã¯ã¹ã追å ããã¦ããã Blocks Programming Topics: Introduction Perl ã§ããã¨ããã®ç¡åé¢æ°ï¼ã³ã¼ããããã¯ï¼ãä½ããã¨ãã§ããæ©è½ã§ãPerlã§ããã¨ããã® my $f = sub { ... }; $f->(); 㯠void (^f)() = ^{ ... }; f(); ã®ããã«æ¸ãããæ¸å¼ããããã®ã¯Objective-Cã®å®ããªã®ã§ããããã¾ãããã ãã詳ããæ¸å¼ã«ã¤ãã¦ã¯ä¸è¨ããã¥ã¡ã³ããè¦ãã¨è¯ãã ãããããã©ã«ãã§ã¯Perlã®ã³ã¼ããããã¯ã¨ã¯ã¬ãã·ã«ã«å¤æ°ã®æ±ããç°ãªãã my $i = 0; my $f = sub { return $i + 1 }; $i++; $f->(); # 2 ãè¿ã perlã§ã¯ãã®ããã«ã¬
{{#tags}}- {{label}}
{{/tags}}