scala
æ¯è¼ã¢ããã«ã¤ãã¦èå¯ããã¦ããä¸é£ã®ã¨ã³ããªã«æéãåãã¦ãç§ãæ¯è¼ã«ã¤ãã¦èãã¦ã¿ã¾ããã æ¯è¼ã¢ãã - terazzoã®æ¥è¨ ç¶ã»æ¯è¼ã¢ãã - terazzoã®æ¥è¨ ç¶ã»ç¶ã»æ¯è¼ã¢ããã復è®ç·¨ã - terazzoã®æ¥è¨ ã¾ããèå¯å¯¾è±¡ã¨ãã¦ãæ¯è¼çµæãã¨ãæ¯è¼â¦
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 ã«ãªã£ã¦ããä¾ã¯ãã¾ãè¦æããªããã¢ããªã±ã¼ã·ã§ã³ãã¸ãã¯ã ãè¦ãã°åããªãã ããã©ãå®éã®å é¨åä½ã¯å ¨ç¶éã£ã¦ããããããããã¦ãããã©ã¼ãã³ã¹ãè´å½çã«â¦
ç´ å æ°å解ã ã®å½¢å¼ã«ãªãæ°ãããã³ã°æ°ã¨ãã*1ããã®æã®åé¡ã¯ããã¯ã Haskell ã§æ¸ãã¨ã¹ãããªãããHamming numbers - Rosetta Code ãã Haskell ã®ã³ã¼ããå¼ç¨ããã hamming = 1 : map (2*) hamming `merge` map (3*) hamming `merge` map (5*)â¦
Scala ã® for å¼ã§è¦é¢ç®ã解ãã¦ããã¨ã³ããªãè¦ã¤ãã人ã Haskell 㨠Groovy ã§è§£ããªãããªã¹ãå å 表è¨ã«ã¤ãã¦èãã¦ããããã®ãããªã¨ã³ããªãè¦ãããã¨ããã¤ãé¢ç½ããªã¼ã¨æå¿ãããã©ãã©ããç§ã¯å®æ¦ã§ä½¿ãããªãã¦ããªããããããã¯ãããâ¦
å æ¥ãæé帯éè¤ãã§ã㯠ã®åé¡ã Scala ã§è§£ãã¦ã¿ãã®ã§ããããã®å¿ç¨ç·¨ãåºé¡ããã¾ããããªãã¨ããã客æ§ããä»æ§å¤æ´ãè¨ã渡ããã¾ãããã§ãã¨ãï¼ï¼ï¼ï¼ããã¼ãããã¼ããããã«è¨ã£ã¦ãã¼ãã¹ãã²ãã¼ãããã¼ï¼ï¼ï¼ä»åã¯ç¹ã«è¦æã¯ããã¾ãâ¦
ãé¡ï¼æé帯éè¤ãã§ã㯠- No Programming, No Life ã Scala ã§è§£ãã¦ã¿ã¾ãããã失æãããããããªãå¦çããè¨è¿°ããéã«ãJava ã§ã¯ä¾å¤ã使ãã¨æãã¾ãããScalaã§ã¯ãOption ã使ãã¨ããé¸æè¢ãããã¾ããããã§ãä»åã®çæ¡ã¯ãä¾å¤ã§ã¯ãªãã¦â¦
ããã°ã©ãã³ã°åé¡ãµã¤ãProject Eulerã®ç¬¬216åã«ããããªåé¡ãåºãã1 èªç¶æ° n ã«ã¤ãã¦ã2*n2-1 ãç´ æ°ã¨ãªããã®ã®åæ°ãæ±ããæ®éã«ç´ æ°å¤å®ããã¨è¨ç®æéããããï¼ä¸æéãããï¼ï¼ã®ã§å·¥å¤«ããã¢ã«ã´ãªãºã ã§è§£ããã¨ããã®ãåºé¡æå³ã¨æããâ¦