Lambda calculus (also written as λ-calculus) is a formal system in mathematical logic for expressing computation based on function abstraction and application using variable binding and substitution. Untyped lambda calculus, the topic of this article, is a universal model of computation that can be used to simulate any Turing machine (and vice versa). It was introduced by the mathematician Alonzo
å æ¥ã®ã¨ã³ããªã§æç¶ããè¨è¿°ããã¨ããå´é¢ã¨ãå¼ãè¨è¿°ããã¨ãã2ã¤ã®å´é¢ãããã¨ãããã¨ãæ¸ãã¾ããã ããã°ã©ã ã®çè«ã¨ã¯ãªã«ã ããã¦ãæç¶ãã®æ§è³ªã¨ãã¦ä»£è¡¨çãªãã¢ã«ã´ãªãºã ã«ã¤ãã¦ã®åå¼·ã®ãããã«ã¤ãã¦ã¾ã¨ãã¦ã¿ã¾ããã ã¢ã«ã´ãªãºã ã®åå¼·ã®ããã ããã§ãä»åã¯ãå¼ãè¨è¿°ããã¨ããå´é¢ã®åå¼·ã®ãããã¨ããã¨ãã®åéã¯èªåã§ãã¾ã å ¨ç¶åå¼·ãã¦ãªãã£ãã®ã§ãããããã©ãããæ¬ãèªããã¨æã£ã¦ããããã¾ã¨ãã¦ã¿ã¾ãã ããã°ã©ã æå³è« ããã°ã©ã ã¯å¿ ãããã°ã©ã è¨èªãå°ãªãã¨ãè¨å·ã§è¨è¿°ãã¾ãã*1 ããã§ãããã°ã©ã ã®åå¼·ã¨ããç¹ã§ã¯ãã©ã®ããã«åããã¨ããã¢ã«ã´ãªãºã ã®åå¼·ã ãã§ã¯ãªããã©ã®ããã«æ¸ããããæ¸ãããã®ã«ã©ã®ãããªæ§è³ªãããã®ãã¨ãããã¨ãç¥ãå¿ è¦ãããã¾ãã ä¾ãã°ã2005å¹´ãããããRubyã®ãããªåçåä»ãè¨èªãæµè¡ãã ããJavaãªã©ã®éçåä»ãã®è¨èªã¨ã®
⺠2022 (2) ⺠10æ (1) ⺠2æ (1) ⺠2021 (51) ⺠11æ (2) ⺠10æ (2) ⺠9æ (4) ⺠8æ (4) ⺠7æ (4) ⺠6æ (4) ⺠5æ (3) ⺠4æ (10) ⺠3æ (7) ⺠2æ (4) ⺠1æ (7) ⺠2020 (155) ⺠12æ (7) ⺠11æ (10) ⺠10æ (8) ⺠9æ (8) ⺠8æ (11) ⺠7æ (21) ⺠6æ (19) ⺠5æ (14) ⺠4æ (20) ⺠3æ (13) ⺠2æ (10) ⺠1æ (14) ⺠2019 (293) ⺠12æ (11) ⺠11æ (12) ⺠10æ (24) ⺠9æ (29) ⺠8æ (27) ⺠7æ (36) ⺠6æ (40) ⺠5æ (24) ⺠4æ (35) ⺠3æ (42) ⺠2æ (6
æ¤ç´¢ãã¦ããããããã ã®ã¯ã¦ãªã»ãã¨ããããã¼ãã«ãYã³ã³ããã¼ã¿ããããã¾ãããï¼ ã¨ããè¨äºã«ãããé¢ã£ã¦é¢ç½ãã£ãã®ã§ Scheme åçµãã¦ã¿ã¾ããã ã©ã ãé¢æ°ã®è¡¨è¨ ã©ã ãé¢æ°ã¯ãλx.xãã®ããã«è¡¨è¨ãã¾ãã λx.x λx.x*2(λx.x*2)y ã¨ããé¢æ°ã¯ãxã®é¨åãyã§ããããã㨠(λx.x*2)y â y * 2ããã¨ãªãã¾ãããããç°¡ç´ã¨ããã¾ãã ;; scheme (lambda(x) x) ;=>ã#<closure #f> ((lambda(x) x) 2) ;=>ã2 # ruby lambda{|x| x} #=> #<Proc:0xb77e75a4@(irb):1> lambda{|x| x}.call(2) #=> 2 -- Haskell > (\x -> x) 2 -- => 2 > :t (\x -> x) -- => (\x -> x)
ãã£ã¨ãYã³ã³ããã¼ã¿ãä½ãæå³ãããã®ãªã®ããã©ãããæ義ãããã®ãããããã¾ããã ååã使ããå帰ãã§ãã¾ããï¼ã¨ããã ãã®ãã®ãããªãã£ãã®ã§ããã ã¾ãλããã é¢æ°ã®è©±ããããã®ã§ãã ãã®ã¨ãããã¡ãã¡ hoge(x) = x * 2 ã¨ãã¦hogeãã»ã»ã»ãã¨ãååãã¤ãã¦è©±ãé²ããã®ãããã©ããªã®ã§ãé¢æ°ãå¤ã¨ãã¦ããããã¨ä¾¿å©ã¨ãããã¨ã§ãλã¨ããå¤ãå®ç¾©ããã®ã§ãã ããããã¨ãä¸ã®hogeé¢æ°ãªããã¯Î»(x)(x*2)ãªã©ã¨ããããã¾ãããå¼æ°ãããããã®ã«()ã使ãã¨ããããã¾ãããããã®ã§ã λx.x*2 ã®ããã«è¡¨è¨ãã¾ãã ã¨ããã®ãλã ãã®ã¨ããλã«ãªã«ããããããããå¼æ°ã¨ãã¦ããããããé¨åãåç´ã«ããããã¾ãã (λx.x*2)y ã¨ãã£ãããxã®é¨åãyã§ãããã㦠(λx.x*2)y â y * 2 ã¨ãªãã¾ããλã®å¼æ°é¨åãä¸ããããå¼æ°ã§ç½®
2006å¹´04æ16æ¥13:53 ã«ãã´ãªMathæ¸è©/ç»è©/åè© Turingã¨Churchã®çé㧠The Emperor's New Mind Roger Penrose [é¦è¨³:çå¸ã®æ°ããå¿] ãªãã§ã²ãã½ããå復ãããã«ããããªãã£ãããæ¶æ¸¬ããã¨ããå¤æ°ã¨ã¯ä»£å ¥ãã¹ããã®ããã¨ããæç¶ãåè¨èªã®åªç¸ãæãç«ã¤ãã²ãã½ãã¯å¥ã«ãã£ããããå¿ è¦ã¯ãªããhyukiããããããã«å¼ã£ããã£ã¦ãããã ããã ãã®è¨¼æ ãã以ä¸ã«ãè¦ãããã [çµ]2005å¹´8æ - www.textfile.org sub fix { my $G = shift; return $G->( sub { my $x = shift; return fix($G)->($x); } ); } ããã¯Perlã§å®è£ ããä¸åç¹é¢æ°ã§ãå ¨ãåé¡ãªãåããããããhyukiãããç¥ãã¬éã«ä¸ã¤ãååããç¯ãã¦ããã
ããã«ã¡ã¯ id:cero-t ã§ãã ããªãã¨ããã¯é¢¨éªãã²ããªããã¨è¨ããã¦ããã¨ãã å æ¥ãã¤ã³ãã«ã¨ã³ã¶ã«æãã£ã¦ãã¾ãã¾ãã¦ã éãçï¼å¤æ®µå¸å£ï¼é»æ°æ¯å¸ï¼æã®ã³ã³ãã§ä¸æ°ã«æªå¯ãå¹ãé£ã°ãã ä¸æ¥ã§ç±ãä¸ãããã®ã®ãææäºé²ã®ããã«åºç¤¾ãæ§ããããã«æéã§ãã ã¡ãã£ã¨Java8ãªã©ã¨æ¯ãã¦ãã¾ããã ãããä»æ¥ã¯Java8ã®è©±é¡ã§ãã ä»å¹´ã®ç§ã«æ£å¼ãªãªã¼ã¹ãäºå®ããã¦ããJavaSE8ã§ããã OpenJDKã®ãµã¤ãã§ã¯ãæ¢ã«Early Accessçãå ¥æãããã¨ãã§ãã¾ãã JDK8 : http://openjdk.java.net/projects/jdk8/ ãã¦ã³ãã¼ã : http://jdk8.java.net/download.html 1/31ã«ããã¤ã«ã¹ãã¼ã³6ããªãªã¼ã¹ãã Feature Complete ã¨ãªãã¾ããã ååããããã¨ å ¨æ©è½éçº
Shiro Kawai 11/20/2000ååºã3/29/2002æ´æ° Cã«æ £ããããã°ã©ããSchemeã®ã³ã¼ããè¦ã¦é¢é£ãããã¨ã®ã²ã¨ã¤ã¯ã ç¡åã®é¢æ°ããã¼ã«ã«é¢æ°ã®å¤ç¨ã ããã ç¹ã«å®è¡å¹çã«ææãªããã°ã©ãã«ã¨ã£ã¦ã¯ãé¢æ°å¼åºãã¯é«ä¾¡ã ã¨ããæè¦ãæã¿çãã¦ããããã è³ãã¨ããã«æ£ãã°ããããlambdaã«çãã²ããã¦ãã¾ãããã ã ãããSchemeã«ããã¦ã¯ã ã³ã¼ãä¸ã«é¢æ°ãæ¸ãã¦ããããã¨ãã£ã¦ å®è¡æã«ã¹ã¿ãã¯ãã¬ã¼ã ã®çæãã¬ã¸ã¹ã¿ã®éé¿ãªã©ã®ãªã¼ãããããèµ·ããã¨ã¯éããªãã ä¾ãã°é¢æ°ã®æå¾ã«å¥ã®é¢æ°ãå¼ã³åºãæ«å°¾å¼ã³åºã(tail call) ã¯ãã ã®jumpã¤ã³ã¹ãã©ã¯ã·ã§ã³ã«ç½®ãæãå¯è½ã ã ããã§ã¯ãCããã°ã©ãã対象ã«ã lambdaã§çæãããé¢æ°ç¾¤ãå®éã«ã©ã®ããã«å®è¡ããå¾ãã®ããæ¸ãã¦ã¿ããã (ãªããSchemeã®è¦æ ¼ã§ã¯lambdaãã©
æ°å¹´ããã§ã¨ããããã¾ãã2009å¹´ã®æåã®ãã¿ã¯ããã°ã©ãã³ã°ã®ãã¿ã«ãããã¨ã«ãã¾ããã Rubyã«ã¤ãã¦ã®ã¹ãããªã¨ã³ããªã¼ããã£ãã®ã§ãç´¹ä»ãã¾ãã no title ç§ã¯ç¿»è¨³è½åããªãã°ãããããªã¼ãã£ã³ã°è½åã貧ç¸ã§ãããã²ãåæãèªãã§ã¿ã¦ãã ããã ã¯ããã« Rubyã®blockãProcãlambdaã¯ãã¯ãã«ã§ããã解ãã«ãããRubyã¯ã¯ãã¼ã¸ã£ã使ãæ¹æ³ã4ã¤ãã£ã¦ããããããã§ãããã¤éãã¾ããããã§ã¯ããã®ã¸ãã解説ãããã¨æãã¾ãã Block ãã£ã¨ãç°¡åã§ããã¤Rubyã£ã½ãã¨è¨ãã°ãBlockã§ããã array = [1, 2, 3, 4] array.collect! do |n| n ** 2 end puts array.inspect # => [1, 4, 9, 16] ä½ãèµ·ãã£ã¦ãããï¼ ã¾ããblockä»ãã§Arrayã®"collect
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}