An exercise for Closeness Centrality algorithm with Scala