mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-11-27 04:44:08 +03:00
Merge pull request #891 from arturmkrtchyan/scala_fix
[scala] Fixed Person class' constructor signature
This commit is contained in:
commit
3b1a125a79
@ -476,7 +476,7 @@ sSquared.reduce (_+_)
|
||||
// The filter function takes a predicate (a function from A -> Boolean) and
|
||||
// selects all elements which satisfy the predicate
|
||||
List(1, 2, 3) filter (_ > 2) // List(3)
|
||||
case class Person(name:String, phoneNumber:String)
|
||||
case class Person(name:String, age:Int)
|
||||
List(
|
||||
Person(name = "Dom", age = 23),
|
||||
Person(name = "Bob", age = 30)
|
||||
|
Loading…
Reference in New Issue
Block a user