Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Actually in scala for just getting the city and lowercase it I would write that: article.author.flatMap(_.address.flatMap(_.city.map(_.toLowerCase)))

I know that's by far not as good looking as the c# version, however at the end all comes down to syntactic sugar.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: