æ¬è¨äºã¯ãRubyãæ¸ãã«ããã£ã¦ãããã«ãããã¯ãæ¸ããã«ãã¾ããããã追æ±ããã誰å¾ãªé£è¼ã§ããã ãlambdaã®æé»é¢ãã«å ã¡ãããã°ã©ããå¯èªæ§ã¨ãã¡ã³ããã³ã¹æ§ã¨ãç¡è¦ãã¦å¥½ãæ¾é¡ã³ã¼ãæ¸ããããããªã£ããæªæ°ã¯ãªãã£ããããããããæçãªæ å ±ãå«ã¾ãã¦ããå¯è½æ§ãããããåºæ¬çã«ã¯å®³æªãããªãã¯ããªã®ã§ã話ååã§èªãã§é ãããΣ(||ï¾Ðï¾)ï¾ï¾ï½¨ï½¨ï½¨ï½¨ï½ å¯å¤é·å¼æ°ã«å¯¾ããã«ãªã¼å ååãProc#curryãå©ç¨ãã¦é¢æ°ãã«ãªã¼åããæ¹æ³ã示ãããããå¯å¤é·å¼æ°ãã¨ãé¢æ°ã«ã¯ã«ãªã¼åããã¾ãä½ç¨ããªããå¼æ°ãé©ç¨ããåæ°ã決ãããã¨ãã§ããªãããã ã [1] pry(main)> f = "foo".method(:gsub).to_proc => #<Proc:0x007fe59112f588 (lambda)> [2] pry(main)> f.arity => -1
{{#tags}}- {{label}}
{{/tags}}