Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @tailrec
- def hasDupes(es: Seq[Employee], names: Set[Name] = Set.empty): Boolean =
- !es.isEmpty && (names(es.head.name) || hasDupes(es.tail, names + es.head.name))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement