// define a type alias type UserId = Long // can be used as a regular type val userId: UserId = 123L val userIds: List[UserId] = List(1L, 2L, 3L)
Reply on news.ycombinator.com