ç·ç§°æŒç®åïŒgeneric operatorïŒãšã¯ãç°ãªãåã®ããŒã¿ã«å¯ŸããŠåãååã®æŒç®ãé©çšã§ããããã«ããæ©æ§ã®ããšãæããŸããå
·äœçã«ã¯ãæŒç®ã®å®è£
ãããŒã¿åã§ã¯ãªããæŒç®åã«å¯Ÿå¿ä»ããããšã§ãç°ãªãåã®ããŒã¿ã«å¯ŸããŠåãæŒç®åã䜿ããããã«ããŸããããã«ãããããã°ã©ã ã®æœè±¡åã¬ãã«ãé«ããããšãã§ããŸãã
ããšãã°ã"+" æŒç®åãç·ç§°æŒç®åã§ããå ŽåãæŽæ°ã®å ç®ãæµ®åå°æ°ç¹æ°ã®å ç®ãè€æ°ã®ãªã¹ãã®çµåãªã©ãç°ãªãåã®ããŒã¿ã«å¯ŸããŠåã "+" æŒç®åã䜿çšããããšãã§ããŸããç·ç§°æŒç®åã¯ãããã°ã©ã ãããæè»ã«ããç°ãªãããŒã¿åéã§ã®æäœãç°¡åã«ããããã«äœ¿ãããŸãã
SICPã§ã¯ããã®ãããªæŠå¿µãå°å
¥ããæœè±¡ããŒã¿åãããŒã¿é§åããã°ã©ãã³ã°ã®æŠå¿µãåŠã¶ããã®åºç€ãšããŠããŸããç·ç§°æŒç®åãå©çšããããšã§ãããæœè±¡çãã€åå©çšå¯èœãªã³ãŒããæžãããšãã§ããããã°ã©ãã³ã°ã®æè»æ§ãšè¡šçŸåãé«ããããšãã§ããŸãã
æåã®é£çµã«+èšå·ã䜿ãèšèªããããŸãããïŒ
ã¯ãããã®éãã§ããæååã®é£çµã«"+"èšå·ã䜿çšããããã°ã©ãã³ã°èšèªãããã€ããããŸãããã®ãããªèšèªã§ã¯ã"+"æŒç®åã䜿çšããŠæååå士ãç°¡åã«çµåã§ããŸããããã¯ã"+"æŒç®åãç·ç§°æŒç®åãšããŠæ©èœããæ°å€ã®å ç®ã ãã§ãªãæååã®é£çµã«ã䜿ãããå Žåã®äžäŸã§ãã
SICPã§ã®ç·ç§°æŒç®ågeneric operations
è€çŽ æ°ã®ãããªããŒã¿è¡šçŸãèããŠã¿ã
ããŒã¿ã®æœè±¡åã¯ã"æå°å
¬çŽæ°ã®åç "ã®å¿çšãšèããããšãã§ãã
è°è«ã¯ãã以éãã©ããŸã§è©äŸ¡ãé
ãããããšãã§ãããããšããè°è«ã«ãªãããããŠè°è«ã¯ãååã®è¡çªããžãããã
匷å¶é©çšïŒã³ãšãŒã·ã§ã³ïŒCoercionïŒ
ããã°ã©ãã³ã°ã«ããããã³ãšãŒã·ã§ã³ãïŒCoercionïŒãšã¯ãåã®èªåå€æãæãçšèªã§ããããã¯ãããã°ã©ã ãç°ãªãããŒã¿åã®å€ãåãæ±ãéã«ãèªåçã«äžæ¹ã®åãããäžæ¹ã®åã«å€æããããšãæå³ããŸããã³ãšãŒã·ã§ã³ã¯ãåã·ã¹ãã ã匱ãåä»ããããèšèªããåçã«åä»ããããèšèªã§äžè¬çã«èŠãããçŸè±¡ã§ãã
代æ°ããŒã¿åã®å€ã¯ãã¿ãŒã³ãããã³ã°ã«ãã£ãŠè§£æãããã³ã³ã¹ãã©ã¯ã¿ããã£ãŒã«ãåã«ãã£ãŠå€ãèå¥ãããã®äžã«å«ãŸããããŒã¿ãæœåºããã