Update samples.
[fsharp-ref.git] / FSharpRef / Main.fs
1 module Main
2
3 open System.Linq
4 open Functional
5
6 // For dynamic typing. To print anything in our case.
7 let inline print a = printfn "%A" a
8
9 [<EntryPoint>]
10 let main args =
11 appendFile "test.txt" "Pouet"
12 printfn "Size of folder: %A" (SizeOfFolder ".")
13 print "youpi"
14 print (isEven (fac 4))
15 //
16 print steve.First
17 printfn "Person equality: %A" ({ First = "Steve"; Last = "Holt"; Age = 42 } = steve)
18 printfn "Young persons: "
19 (youngPersonNames (Queryable.AsQueryable [steve ; stevesTwin ; { First = "Paul"; Last = "Atreides"; Age = 11 }])) |> Seq.iter (fun name -> printfn " name: %s" name)
20 //
21 print <| Seq.take 10 allPositiveInts
22 print <| Seq.take 10 (fibs 1 1)
23 //
24 print testYieldBang
25 print testUnfold
26 //
27 print <| greet Bill
28 print <| greet "Paul"
29 //
30 print <| testXor 1 2
31 print <| testXor 3 3
32 0