Commits

mmiller  committed c4d14ac

Updated function demo

  • Participants
  • Parent commits b2da732

Comments (0)

Files changed (2)

File src/d1/Demo2.scala

 package d1
 
 /**
- * Constructors & Inheritance
+ * Constructors & Inheritance, Objects
  * @author mimiller
  */
 object Demo2 {

File src/d3/Demo6.scala

 	  
 	  val newCost = c.getCost(base => base + 203.23)
 	  Console.println(c.name + " costs $" + newCost);
+	   
+	  val costCalc = (base: Double) => {
+	       base * 2
+	  }
+	  
+	  Console.println(c.name + " costs $" + c.getCost(costCalc));
   }
   
   def calc(base: Double): Double = {