Closed siddharth-krishna closed 1 year ago
Thanks @ngua -- I've done as you suggested, and also added a logging message as discussed with Scott so that we can monitor if people are doing a lot of slow random access, and if so we can move to using Vector
in a future PR.
This PR adds support for array indexing
[1, 2, 3] !! 2 == Array.get [1, 2, 3] 2 == 3
and array pattern matching:Currently we only allow literal patterns like
[x, _, ...]
, but no cons-style patterns like Haskell'sx : xs
. This means you must have a final| _ -> ...
or| a -> ...
pattern in order for the pattern match to be exhaustive.