"ASP.NET and Web Tools 2013.1 for Visual Studio 2012. includes
ASP.NET MVC 5, Web API 2, Scaffolding and Entity Framework, etc.
download
Here is equivalent function declaration in F#; F# is strongly typed, and compiler can assign data type of function and arguments based on context! In example below, "add 3 5" will produce value 8 of type int; the next line that is commented out would produce a string; so same declaration can be for int and string, but not at the same time, since compiler decides type based on first occurrence.int add(int x, int y) { return x+y; } string add(string x, string y) { return x+y; }
F# functions are just values, and can be assigned and passed around as parameters; For example add' gets assigned a lambda expression (anonymous function), with same meaning as previous declaration:let add x y = x + y printfn "%d" (add 3 5) // printfn "%s" (add "Hello" "World")
function can have data types declared:let add' = fun x y -> x + y
The compiler can also infer function type of parameter from context;let add (x: int) (y:int) : int = x + y
let checkThis item f = if f item then printfn "HIT" else printfn "MISS" checkThis 5 (fun x -> x > 3) checkThis "hi there" (fun x -> x.Length > 5)