rubyã§1å¼æ°é¢æ°ãmapã«æ¸¡ãå ´åã¯ããããªãããã§ã¡ã½ããã®ã·ã³ãã«ãProcãªãã¸ã§ã¯ãã¨ãã¦æ¸¡ãã¦é¢æ°ããã°ã©ãã³ã°ã£ã½ãæ¸ãæ¹ãã§ãããã ãã©ã irb > ('a'..'c').map &:upcase => ["A", "B", "C"] 2å¼æ°ã«ãªãã¨ã©ãæ¸ãã°ããããããã¨æã£ã¦ãã®ã ãã©ããã¼ãã§ã¯ãRubyèªãã§ããã9.3ç« Methodãªãã¸ã§ã¯ãã¨Procãªãã¸ã§ã¯ãã®ã¨ããã«ãããªæ¸ãæ¹ãè¼ã£ã¦ãã irb > (0..10).map &2.method(:*).to_proc => [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20] ããããç´æçãããªããã©ãæ°åã®2ã®ã¤ã³ã¹ã¿ã³ã¹ããä¹ç®ã¡ã½ãã*ã®Methodãªãã¸ã§ã¯ããåå¾ãã¦ãProcãªãã¸ã§ã¯ãã«å¤æãã¦æ¸¡ãã¦ããæ°åã®2ã¯Mehtodãªãã¸ã§ã¯ãã®ã¬ã·ã¼ãã¨ãã¦æç¸
{{#tags}}- {{label}}
{{/tags}}