A custom generic mutable hash map implementation in Scala