progs/lecture2.scala
changeset 323 93b6c16dded8
parent 320 90aed247c8cf
child 329 828326d1b3b2
equal deleted inserted replaced
322:856aaa591840 323:93b6c16dded8
   156 Try({
   156 Try({
   157   val x = 3
   157   val x = 3
   158   val y = 0
   158   val y = 0
   159   Some(x / y)
   159   Some(x / y)
   160 }).getOrElse(None)
   160 }).getOrElse(None)
       
   161 
       
   162 
       
   163 // minOption 
       
   164 // maxOption 
       
   165 // minByOption 
       
   166 // maxByOption
   161 
   167 
   162 // Higher-Order Functions
   168 // Higher-Order Functions
   163 //========================
   169 //========================
   164 
   170 
   165 // functions can take functions as arguments
   171 // functions can take functions as arguments