package com.leegh.implicits
/**
* @author Guohui Li
*/
object Implicit_Conversions_with_Implicit_Parameters {
def main(args: Array[String]): Unit = {
def bigger[T](a: T, b: T)(implicit ordered: T => Ordered[T]) = if (ordered(a) > b) a else b
println(bigger(4, 3))
println(bigger("Spark", "Hadoop"))
}
}
附:
本部落格說明:
1.整理思路,提高自己。
2.受教于王家林老師,有所收獲,故推薦。
3.部落格注重實踐,多餘的文字就不多說了,都是做技術的。
4.資訊來源于 DT大資料夢工廠微信公衆賬号:DT_Spark。
DT大資料夢工廠的微信公衆号是DT_Spark,每天都會有大資料實戰視訊釋出,請您持續學習。
王家林DT大資料夢工廠scala的所有視訊、PPT和代碼在百度雲盤的連結:http://pan.baidu.com/share/home?uk=4013289088#category/type=0&qq-pf-to=pcqq.group
王家林《Scala深入淺出實戰初級入門經典視訊課程》http://edu.51cto.com/lesson/id-66538.html
王家林《Scala深入淺出實戰中級進階經典視訊課程》http://edu.51cto.com/lesson/id-67139.html