daily pastebin goal
89%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   // Vals en el constructor son propiedades:
  2.   // p = Person("fede","silva", 10 )
  3.   // p.first
  4.   case class Person( val first:String, val last:String, val age:Int )
  5.  
  6.   // Como si fuera statics:
  7.   // Person.key
  8.   object Person extends Mapper[Person] {
  9.  
  10.     def key = first
  11.  
  12.     val first = "first" is { _.first } // "name" is accesor
  13.     val last  = "last"  is { _.last  }
  14.     val age   = "age"   is { _.age   }
  15.  
  16.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top