Assuming that e.g. Data is an array of arrays, then the second 'values' is a 2-tuple since the map call is returning a sequence of 2-tuples. And tuples don't support the indexing operator .[] (If you are using VS, you can see this by hovering the mouse over 'values' after skipWhile to see its type.)

1
2
3
4
5
6
7
 
let Data = [| [|1|]; [|2|] |]
let temp = 
        Data
        |> Seq.map(fun values -> float values.[0], float values.[1])
        |> Seq.skipWhile(fun values -> values.[1] > 1)
temp

What are you trying to do?

By on 6/16/2009 4:49 PM ()

Figured it out by watching the F# tutorial, basically I needed to create a function that took the tuple that returned bool based on the values in the tuple, its a different way of doing things that I'm used to but it works great.

By on 6/16/2009 5:47 PM ()
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