æ°ããè¨èªãããã£ããã¨ããããã©ã ãè¨ç®ã®ã¤ã³ã¿ããªã¿ãå®è£ ãããã! Scalaã§ãµã¤ãã«ã©ã ãè¨ç®ã®ã¤ã³ã¿ããªã¿ãå®è£ ããã®ã¯ãã¾ãã«ç°¡å*1ãªã®ã§, åã¬ãã«ã§ãã£ã¦ã¿ã. ã¾ãããªè©±ããã¦ããã¨, C++ã®ãã³ãã¬ã¼ãããã¥ã¼ãªã³ã°å®å ¨ãªã®ã¯æåãªè©±ã ãã©, Scalaã§ã¯ã©ããªã®ãæ°ã«ãªã£ã. 以åC++ã®ãã³ãã¬ã¼ãã§ã©ã ãè¨ç®ã®ã¤ã³ã¿ããªã¿ãå®è£ ããã®ã¨åæ§ã®ãã¨ãã§ãããæèå®é¨ãã¦ã¿ãã¨, ã ãããã§ãããã«æããã®ã§ãã£ã¦ã¿ã. ã§ãããã® ä¾ import lambda._ case class Equals[A >: B <: B, B]() // åã¬ãã«ã®åå¤æ§ãã§ãã¯ç¨ type S = x ->: y ->: z ->: ( x @@ z @@ (y @@ z) ) type K = x ->: y ->: x type result = ( S @@ K
{{#tags}}- {{label}}
{{/tags}}