I'm getting "Lookup on object of indeterminate type based on information prior to this program point" error on this snippet:
let a = [|"a"; "bb"|]
let n = Array.mapi (fun i x -> (i * x.Length)) a
What is wrong with it? Visual Studio F# Interactive correctly shows the type of x as string when I hover the cursor above it. Why do I have to write:
let a = [|"a"; "bb"|]
let n = Array.mapi (fun i (x:string) -> (i * x.Length)) a
to compile successfully?