You are viewing a single comment's thread. Return to all comments →
It's possible to optimize by using the fold operation
foldLeft(0)({case (acc,i) => acc+1})
Seems like cookies are disabled on this browser, please enable them to open this website
List Length
You are viewing a single comment's thread. Return to all comments →
It's possible to optimize by using the fold operation