Ruby ã® Array#zip ã¯ãããã¯ãåãã¾ããï¼æ»ãå¤ã¯ nil ã¨ãªã£ã¦ããããï¼Haskell ã® zipWith ã®ãããªå¦çã¯ã§ãã¾ããï¼æ¢ãã¦ã¿ã¾ãããããã£ã½ãã®ã¯ç¡ãã®ã§èªä½ãã¦ã¢ã³ãã¼ããããå½ã¦ããã¨ã«ãã¾ããï¼ class Array def zip_with *args if block_given? self.zip(*args).map{|a| yield *a} else self.zip(*args).map end end end
{{#tags}}- {{label}}
{{/tags}}