<Query Kind="FSharpProgram" />

let add x y = x + y
// add: int -> (int -> int)

let add3 = add 3
// int -> int

let a = add3 4 
printfn "a=%d" a  
// 7

let add' (x, y) = x + y
// add' : (int*int) -> int

let a' = add' (3, 4) 
printfn "a'=%d" a' 
// 7

let t = 3, 4  // (3, 4)
// t: Tuple<int, int>
// t.Dump ()
let f = fst t
printfn "f=%d" f

// ---

let m = Array.map (fun x -> x + 1)
let x = [|10; 20; 30|] |> m
printfn "x=%A" x

let m' = List.map (fun x -> x + 1)
let x' = [10; 20; 30] |> m'
printfn "x'=%A" x'

// ---

let x'' = [|10; 20; 30|] |> Seq.map (fun x -> x + 1)
printfn "x''=%A" x''
let x''' = [10; 20; 30] |> Seq.map (fun x -> x + 1)
printfn "x'''=%A" x'''

// ---

