Is it possible to locally restrict the import of a module, preferrably combining this with Module Abbreviations
? The goal is to avoid polluting my current module with symbols from imports.
e.g. (inspired by OCaml) something like that:
let numOfEvenIntegersSquaredGreaterThan n =
let module A = Microsoft.FSharp.Collections.Array in
[|1..100|] |> A.filter (fun x -> x % 2 = 0)
|> A.map (fun x -> x * x)
|> A.filter (fun x -> x > n)
|> A.length
let elementsGreaterThan n =
let module A = Microsoft.FSharp.Collections.List in
[1..100] |> A.filter (fun x -> x > n)
Additionally is there a way to achieve something similar with namespaces?