I’m trying to test some F# code from the Beginning F# book but am getting ‘not defined’ error with the reference to ‘Seq.generate’. (I’m using VS2010 – so this may have worked with earlier vn of VS/F#)
FWIW I’ve also installed the F# Powerpack dll, but that does not seem to make a difference.
Is there a workaround/alternative here?
/// execute a command using the Seq.generate
let execCommand (connName: string) (cmdString: string) =
Seq.generate
// This function gets called to open a connection and create a reader
(fun () -> openConnectionReader connName cmdString)
// This function gets called to read a single item in
// the enumerable for a reader/connection pair
(fun reader -> readOneRow(reader))
(fun reader -> reader.Dispose())
generate can be found in FSharp.PowerPack.Compatibility:Compat.Seq.fs