Either:

1
2
3
4
5
6
7
8
9
10
let linesSplit = 
    System.IO.File.ReadAllLines(fileName)
    |> Array.map (fun x -> String.split [','] x |> List.map System.Double.Parse)
    |> Array.map List.to_array

let linesSplit2 = 
    System.IO.File.ReadAllLines(fileName)
    |> Array.map (String.split [','])
    |> Array.map (List.map System.Double.Parse)
    |> Array.map List.to_array

Should work (although I've not tested this!). I believe the first one should be more effient but find the second one easier to read.

Cheers,
Rob

By on 7/1/2008 9:18 AM ()

Excellent -- the second one works and makes the most sense to me.

Thanks!

By on 7/1/2008 10:32 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper