F#'s type inference works from left to right and top to bottom.
Type of grid
isn't available in the List.map (fun row -> row.[col])
part.
Using pipe operator |>
:
let extractColumn col (grid : Map<string, string> list) =
grid |> List.map (fun row -> row.[col])
makes your example work as expected.