How can I overload .[] for F# array to slice an array based on an arbitrary index array?
For example:
let x = [|1..10|];
let indx = [|4;1|];
although
[| for i in indx ->x.[i]|]
would work, it would be nicer to be able using x.[indx] directly.
You can always write an F# extension method to get close on the syntax
but since arrays already have an indexer it doesn’t appear there’s a way to overload/change it.