ãã¶ã¤ã³(è¨è¨)ãã¿ã¼ã³ã¨ããç¨ã®ãã¨ã¯ãªããEmacs Lisp ã®ãã¿ã¼ã³ãæãã¤ãã¾ã¾ã«æ¸ãã¾ããå¿ã¯ã é«éé¢æ°ãæ¸ãã ãã¯ããæ¸ãã ã§ãã mapcar mapcar ã¯ãå¼æ°ã«é¢æ°ãã¨ãé«éé¢æ°ã®ããä¾ã§ãããªã¹ããåããããããã®å¤ãå å·¥ãã¦ãæ°ãããªã¹ããè¿ããã¿ã¼ã³ã®ã¨ãã¯ãmapcar ã使ãã¾ãããã (mapcar '1+ '(1 2 3 4)) ;; => (2 3 4 5) mapcar ã«ã¯ãèªåã®ããããä»äºãå®è£ ããé¢æ°ã渡ãã¾ãããã (defun f(x) (1+ (* x 2))) (mapcar 'f '(1 2 3 4)) ;; => (3 5 7 9) mapcar ãé£çµãã¾ãããã(ãªãã¸ã§ã¯ãæåã§ã®ã¡ãã»ã¼ã¸ã®é£çµã«ä¼¼ã¦ãã¾ããã) (mapcar '1+ (mapcar (lambda(x) (* x 2)) '(1 2 3 4)
{{#tags}}- {{label}}
{{/tags}}