ã½ã¼ãããã¨ãã®è¨å·ã®æ¹åãè¦ããããªãã¨ããæ©ã¿ãããã
å¤ãã®è¨èªã§ã¯ãæ¯è¼æ¼ç®åã使ã£ã¦ã³ã¬ã¯ã·ã§ã³ãã½ã¼ãããæä½ãå®ç¾©ããã¦ããã
// scalaã ã¨... val lis = Seq(...) // ãªããã®ãªã¹ã lis.sortWith((a, b) => a < b) // æé ã£ã¦ã©ã£ã¡ã ã£ãã»ã»ã»éé ã£ã¦ã©ã£ã¡ã ã£ãã»ã»ã»
大ãªããæ¸ãã°ãããã ã£ãï¼å°ãªããæ¸ãã°ãããã ã£ãï¼æ¯åã°ã°ãã®ã ãè¦ããããªãã
è¨å·ã®å½¢ã®éãã«ã½ã¼ãããã¾ã
ããã»ã©ãè¨å·ã®å½¢ã®éãã«ã½ã¼ãããã ãã¨ãããµãã«è¦ããã°ãããã¨ã«æ°ä»ãããã¤ã¾ãã <
ã¯å·¦ãå°ããå³ã大ããéãã¦ããã®ã§ãã³ã¬ã¯ã·ã§ã³ãå·¦ãå°ããå³ã大ãããã¤ã¾ãæé ascendantã«ã½ã¼ããããã>
ã¯åæ§ã®è¦ãæ¹ã§éé descendantã«ãªãã
lis.sortWith((a, b) => a < b) // å·¦ãå°ããã®ã§æé
lis.sortWith((a, b) => a > b) // å·¦ã大ããã®ã§éé
lis.sortWith(_< _) // ãããããµãã«ãæ¸ãã
ããã§ããå¿ãããã¨ã¯ãªãã ãããã¨ããã§ã¢ã©ãã¢èªåã¨ãã£ãRTLæååã§ã¯å¤§ãªãå°ãªãã®è¨å·ã¯ã©ããªããã ãããè¨èªå¦è ã®äººæãã¦ãã ããã