æãã¿ã¡ã«ãªããåå¿è ç¨è¨èªãã¯Scheme!
最もタメになる「初心者用言語」は Python! - 西尾泰和のはてなダイアリー
Schemeãªãããããããã¨ããããããã®ãããããã ããã¨ãããã§ãã¨ã¨ãå°é£ããã¦ãããããªããã®ããªããããåå¿è ã§ãå®å¿ãã¦ç°¡åã«ã§ããã > <
ãããããããã«ã¼ãã¨å帰å¼ã³åºãã¨ã2ã¤ããã£ãºãã«è¦ããªãã¦ããæ«å°¾å¼åºã1ã¤ã ãè¦ããã°ä¸¡æ¹ã§ãã¡ãããï¼Schemeãããï¼
Schemeã§è±ããªè¡¨ç¾åã身ã«ã¤ãã
ãªãã ãããããããªããã©ãå··ã®ããã°ã©ãã³ã°è¨èªã¯ * ã¨ã - ã¨ã ? ãå¤æ°åã¨ãé¢æ°åã«ã¤ãããªããæ¼ç®åï¼ãªã«ããåå¿è ã«ã¯é£ããã¦ããããªãï¼ï¼
Schemeã ã£ããããããã£ã¦ã·ã³ãã«ï¼ãã£ã¦èãé¢æ°ã¯ symbol? ã£ã¦ããååã«ã§ãããã is_symbolã¨ããããã«ããããï¼ï¼ï¼ã¢ã³ãã¼ãã¼ã¨ãã¿ã¤ããã«ããã¦åå¿è åããããªããï¼ï¼ï¼
åç §éæã§ããããªå¿ããã ã¦ã
Schemeãªããset!ã¨ãset-car!ã¨ãããã¯ãªãããããªä¾å¤çé¢æ°ã使ããªããã°ãåç §éæãªããã°ã©ã ãæ¸ãããï¼åç §éæã£ã¦é£ãããã ãã©ãã¤ã¾ããåã¨åãå¤ãé¢æ°ã«æ¸¡ããããå¿ ãåãå¤ãããã£ã¦ãããã¨ããããªæãï¼ããï¼ããã£ã¦ãããã¾ããããªãã®ï¼ã£ã¦æã£ãããï¼éãããå ¨ç¶éããï¼
Pythonã¨ãã§ã¯ãx += 10 ã¿ãããªæ¸ãæ¹ããããã¨ããããã©ãããã¯ç ´å£çä»£å ¥ã¨ãã£ã¦å¤æ°ã®ä¸èº«ãæ¸ãæãã¡ãããã ããªãã ããããããç ´å£çä»£å ¥ãããã¨ãåãé¢æ°ã§ããåã«å¼ãã ã¨ãã¨ç¶æ ãã¡ãã£ã¦ãã¾ããã¨ãããï¼ç ´å£ãã¡ãããããï¼ï¼ãããã§è¿ã£ã¦ããå¤ãéã£ã¡ãããã ï¼ããããï¼åå¿è ã«ã¯é£ãããï¼ï¼
ãã¡ããSchemeã§ãç ´å£çãªãã¨ãå¿ è¦ã«è¿«ããã¦ããªãããããªããã¨ããããã©ãPã¨ãRã®ã¤ãè¨èªã«æ¯ã¹ãã¨å ¨ç¶ç ´å£çãªãã¨ã¯ããªãã¦ããããã ããSchemeã¯åªãããï¼
æ¬å¼§ã¯ããããªãï¼ï¼
Schemeã®è©±ãããã¨ãã§ãæ¬å¼§ãããããã¨ãè¨ã人ããããã©ãããã¯é£ã¹ç©ã®å¥½ãå«ãã¿ãããªãããªãã ã人åã¨ããã¼ãã³ã¨ãããããä½ã«ãããã©ãå«ãã§é£ã¹ãããªã人ããããããåãæåã¯è¦ãã¦ãã¼ãã³ã¯è¦æã ã£ããã©ãããã°ã£ã¦é£ã¹ã¦ããã¡ã«ãããç¾å³ããããããããã«ãªã£ãããã¨ã¦ãä½ã«ããã¦å æ°ã¢ãªã¢ãªã ãï¼Schemeã®æ¬å¼§ãæåã¯ã¡ãã£ã¨æ £ããªãã¦æ±ãã«ãããããããªããã©ãããã«ãã®ä¾¿å©ãã¨ãããã«æ°ãã¤ãã¦ç ã¿ã¤ãã«ãªã£ã¡ãããï¼
Schemeã¯ä¸ãç®æããï¼
Schemeã®ãããã¨ããã¯ãæ°ããããã°ã©ãã³ã°ã®æµãï¼ãã©ãã¤ã ãã¨ãè¨ã£ãããããï¼ãè¨èªããã¯ã¼ã¢ãããããã¨ãªããã©ã¤ãã©ãªã ãã§ã¨ãããããã¨ãªãã ï¼ãªãã¸ã§ã¯ãæåã¨ããã¢ã¹ãã¯ãæåã¨ããã¡ã¿ãªãã¸ã§ã¯ããããã³ã«ã¨ããä»ã¯é£ããã¦ããããªããã¨ããããããã©ãã©ãç»å ´ãã¦ããæ°ãããã¨ããSchemeã®ä¸ã§åå¼·ãããã¨ãã§ãããã ï¼ããããï¼ãªãã¨ãæåã®ããã ãã«ãæ°ããè¨èªã使ããªãã¦ãããã ã
ããã«ãSchemeã«ã¯ãããããæ©è½ï¼ç¬¬ä¸ç´ã®ç¶ç¶ãå¤å¤ããã¯ããªã©ãªã©ï¼ããã£ã¦åå¼·ã®ãããããããï¼ã¡ãã£ã¨ããã°ãã°ãSchemeã®ã¤ã³ã¿ããªã¿ãæ¸ãã¦åå¼·ãããã¨ã ã£ã¦ã§ããããè¨èªãã³ã³ãã¯ãã ããä»ã®è¨èªããæ¯ã¹ãã¨ã¨ã¦ãæ·å± ãä½ããã ãã
Schemeã¯åå¼·ãããããªã¿ããªã®è¦æ¹ã ãï¼
Schemeã¯Î»ï¼
λãããããλ ï¼ï¼
ãããåãã¯ãããã
Schemeã«ã¯ãã«ã»ãããã®å·åå²æãããã¤ãã£ãGaucheã¨ããå¦çç³»ããã£ã¦ãä½ãé£ãããã¨ããããªãã¦ãç°¡åã«æ¥æ¬èªãã¤ãããããã«ãªã£ã¦ãï¼ãã¾ããGaucheã§Schemeãã¯ããããï¼