Comment

Comment by manoDev

> That should make arr[1] possible but arr[1] = 9 impossible.

I believe you want `=`, `push`, etc. to return a new object rather than just disallow it. Then you can make it efficient by using functional data structures.

https://www.cs.cmu.edu/~rwh/students/okasaki.pdf

parent manoDev 11 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton