Implement expand.grid
slice matrix could be done in F# Array2D