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

FlatMap is often most useful when recursing, in my experience.


I have used recursion two times irl outside of interviews.


Used with flatMap, it's a terribly good way of doing something to everything over an arbitrary object and all it's deep values. I do something like this every month or so.

It's one of those tricks you use a lot once you've seen the problems it's applicable to.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: