2010-11-01ãã1ã¶æéã®è¨äºä¸è¦§
åã§ã®ãããã³ã°ã®å®è£ ãä¸é¨å®è£ ãã¾ããã ããã«ãã£ã¦é¢æ°ã®ãªã¼ãã¼ãã¼ããåºæ¥ãããã«ãªãã¾ããâ print(10) # print_intãå¼ã°ãã print("Hello World") # print_stringãå¼ã°ããé¢æ°å®ç¾©æã«ã¯ãããªæãã§æ¸ãã¾ãâ fib(n!Int): fib(n-1) + fiâ¦
Haskellã«å¯ä½ç¨ãããã®ãï¼ã¨ããã®ã¯é£ãããã¼ãã ã¨æãã¾ãããå°ãªãã¨ãæé©åçè«ã§ã®ä¸è¬çãªãå¯ä½ç¨ãã®å®ç¾©ã§ã¯Haskellã¯å ¨ãå¯ä½ç¨ããªãè¨èªã¨è¨ããã¨æãã¾ãã çè«çã«ç¾ããã¨ããç¹ãHaskellã®è¨è¨ã®ä¸çªéè¦ãªã¨ããã ã¨æãã®ã§ããâ¦
Rowlã®åçãªãã¿ã¼ã³ãããã¨ã³ã¸ã³ã®æ§æã«ã¤ãã¦æ¸ãã¾ãã ã¾ããã¤ã³ã¿ããªã¿å ã«funtableã¨ããé¢æ°ãã¼ãã«(é¢æ°å à å¼æ°ã®æ° â é¢æ°å®ä½)ãããã¾ãã é¢æ°ã®å®ä½ã¯ é¢æ°æ¬ä½(ãã¤ãã³ã¼ã) é¢æ°å®ç¾©ã®ãªã¹ã(ASTã§ã¯ãªãã³ã³ãã¤ã«ããå½¢) ãããªâ¦
以ä¸ã®è¨äºã®ããããã¯ãã¼ã«ã«ã§é¢æ°å®ç¾©ãåå®ç¾©ã§ãããã¨ããä»çµã¿ã«ã¯åé¡ãããã¾ããã®ã§ããããã¨ã«ãã¾ããã ä½ãå¥ã®å½¢ã§çç¾ãªãåæ§ã®æ©è½ã使ããããã«ãããã¨æãã¾ãã fib(n): fib(n-1) + fib(n-2) fib(0): 0 fib(1): 1 print_int(fibâ¦
èªåã¯ã³ã³ãã¤ã©ã®å®è£ è¨èªã«ã¯ãã¿ã¼ã³ããããããã¨æ¥½ã ã¨æã£ã¦ããã®ã§rowlã«ããã¿ã¼ã³ãããã¨ã³ã¸ã³ãå®è£ ãã¦ãã¾ãã以ä¸ã®è«æãåèã«ãã¦ãã¾ãã http://portal.acm.org/citation.cfm?id=507641&dl= ããã¾ã§å¤æ°ãã¿ã¼ã³ãDontcareãã¿ã¼ã³â¦