Hacker News new | past | comments | ask | show | jobs | submit login

You're assuming that x+[5] mutates the list instead of returning a new list.

If you're planning to have multiple threads append items to a list, the immutable way to do it is to have each thread return a list of items to append to the main list, then fold those items into the list.




No, parent post is definitely not assuming that.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: