test perf for iterating a list
minor change
adding fp in scala