Effect CommunityEC
Effect Community2w ago
2 replies
Kae

Benefits of Using `Data.array` over `Object.freeze`

Why should I use Data.array?

What does it get me over Object.freeze on a regular array?
import {Data, Equal} from "effect";

const numbers = Data.array([1, 2, 3, 4, 5])
console.log(Equal.equals(numbers, Object.freeze([1, 2, 3, 4, 5])));
// false
Was this page helpful?