3 ms·
While you are free to implement functions and properties however you like, usually it's pretty clear which one is which. shuffled performs non-trivial computati
by saagarjha 8y ago
While you are free to implement functions and properties however you like, usually it's pretty clear which one is which. shuffled performs non-trivial computation and doesn't seem like an intrinsic property of the array, so it's a function; the opposite is true for first.
- skohan 8y agoAlso on an immutable array, `first` should always return the same value where `shuffled()` may return different values each time it's called.