Immutable array for JavaScript supporting fast "modification" via structural sharing