I have the following function:
let fetchTickerGroup (tickers: string[]) (sqlServer:SQLServerClient) (schema: string) =
tickers |> Array.map(fun x -> sqlServer.FetchTimeSerie(schema,x))
The function takes an array of strings and, through sqlServer
fetches data which is returned by sqlServer.FetchTimeSerie
as a List<b>
where b
is a custom defined object.
Now, mapping the array means that the function fetchTickerGroup
returns List<b>[]
.
I was wondering if it would be possible to flatMap
the result, rather than just mapping the array values.