Guest User

Untitled

a guest
Jan 19th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. case class Interval(x: Int, d: Int)
  2. case class Identifier(x:Int)
  3.  
  4. val secondValue = 5
  5. val input: Map[Identifier, Integer] = Map(Identifier(1) -> 10)
  6.  
  7. val newInput: Map[Identifier, Interval] = input.map({
  8. case (x, d) =>
  9. x -> Interval(d, secondValue)
  10. })
Add Comment
Please, Sign In to add comment