ä»æ¥ã®å°ãã¿ã第2å¼¾ããã³ãããªãã¨ãªãæ¸ãã¦ã¾ãâ¦ã Scalaã«ã¯Optionã¨ããã¯ã©ã¹ããã£ã¦ãæ¨æºã©ã¤ãã©ãªããæ®éã®ã¢ããªã±ã¼ã·ã§ã³ã®ã³ã¼ãã®è³ãæã«åºã¦ãã¾ããããã¯ãã©ããã®Maybeã¢ããâ¦ã«ããããã®ã ã¨æãã®ã§ããããããGroovyã§æ¸ãã¦ã¿ããã¨æãã¾ãã ã¾ãã¯ãæä¸ä½ã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ã Monad.groovy interface Monad<T> { Monad<T> flatMap(Closure closure) void foreach(Closure closure) Monad<T> filter(Closure closure) } Monadã¤ã³ã¿ã¼ãã§ã¼ã¹ã«è¦æ±ãããã®ããã©ãè¦ã¦ãScalaã§ãâ¦ã ï¼withFilterã¨ããã®ã¯ãã¦ãã ãã¨ãGroovyã«ã¸ã§ããªã¯ã¹ãæ¸ãã¦ãããã¾ãæå³ããªãã®ã¯ããã£ã¦ã¾ãããä¸å¿ã¨ãããã¨ã§ã
{{#tags}}- {{label}}
{{/tags}}