2011-05-01ãã1ã¶æéã®è¨äºä¸è¦§
scala ã® parallel collection ã¯ãæ®éã® collection ã使ãããã«ä½¿ã£ã¦ããã ãã§ã並åè¨ç®ã®æ©æµãåããããå ´åãå¤ãã®ã§ãããããã§ã¯ãªãå ´åãå¤ãã§ãããã®å ¸åä¾ããã½ã¼ãã§ããå®ã¯ã並åã®ã½ã¼ãã¯ãã¾ã å®è£ ããã¦ãã¾ãããããããèªåâ¦
Scala exercises for beginners ã foldLeft ã§è§£ãã¦ã¿ãã // Exercise 2 def sum(x: List[Int]): Int = x.foldLeft(0){_ + _} // Exercise 3 def length[A](x: List[A]): Int = x.foldLeft(0){(sum, _) => sum + 1} // Exercise 4 def map[A, B](x: List[â¦
akka ã®ä¾é¡ã§ã¯ãarctan(1) ããã¼ã©ã¼ç´æ°å±éãã¦åå¨çãæ±ããã¨ããä¾é¡ãåãä¸ãã¦ãããå ·ä½çã«ã¯ãä¸è¨ã®æ°å¼ã10000é ã㤠Actor ã«å²ãæ¯ã£ã¦ã並åè¨ç®ãã¦ããããã®ãããªç´æ°ã scala ã§ä¸¦åè¨ç®ããæ¹æ³ã¨ãã¦ã¯ãakka ã使ã以å¤ã«ããscâ¦
Scala ã使ã£ã¦ Haskell 風ã®è¨è¿°ããã¦ããä¾ãæã è¦ãããããã©ãå¾¹é 徹尾 Haskell ã«ãªã£ã¦ããä¾ã¯ãã¾ãè¦æããªããã¢ããªã±ã¼ã·ã§ã³ãã¸ãã¯ã ãè¦ãã°åããªãã ããã©ãå®éã®å é¨åä½ã¯å ¨ç¶éã£ã¦ããããããããã¦ãããã©ã¼ãã³ã¹ãè´å½çã«â¦
groovy 1.8 ã§ã¯ãmemoize ã«ãã£ã¦ã¯ãã¼ã¸ã£ã®ã¡ã¢åãåºæ¥ãããã«ãªã£ãããã©ãscala ã ã£ã¦ã§ãããããã¨ããè² ãæãã¿ã¨ã³ããªã æ®éã®èªåã¡ã¢å ãµã¯ã£ã¨ä½ã£ããã®ã(1ã5å¼æ°å¯¾å¿)ãGistã«ä¸ããã®ã§ç°¡åã«ç´¹ä»ãå®è£ ã®ãã¤ã³ãã¯åç´ã§ãä¸è¨â¦