In F#, indexers are accessed via ".[ ]". So you need to write "command.[0]", then it should be fine.

By on 11/4/2009 5:47 AM ()

Oh and the reason you got that particular error is because the way you had it "command[0]" is passing the list [0] to command, which is not a function. For example:

1
2
3
4
5
6
7
8
9
10
 

> let command x = printfn "It's %A" x;;

val command : 'a -> unit

> command[0];;
It's [0]
val it : unit = ()
By on 11/4/2009 5:49 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