Hacker News new | ask | show | jobs
by jfim 2345 days ago
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.

1 comments

No, parent post is definitely not assuming that.