ZH version is available. Content is displayed in original English for accuracy.
Advertisement
Advertisement
⚡ Community Insights
Discussion Sentiment
50% Positive
Analyzed from 230 words in the discussion.
Trending Topics
#age#cat#list#mutating#haskell#https#syntax#dictionary#example#nested

Discussion (6 Comments)Read Original on HackerNews
> The more interesting example is reassigning the deeply nested l to make the cat inside older, without mutating the original cat
Isn't that mutating l, though? If you're concerned about mutating cat, shouldn't you be concerned about mutating l?
That means if someone has a reference to the original l, they do not see the change (because l is immutable. Both of them).
It's quite handy, though the syntax for it is rather clunky compared to the rest of the language in my opinion.