Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2014
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.93 KB | None | 0 0
  1. open System.IO
  2. open System.Configuration
  3. open System.Collections
  4. open System.Collections.Generic
  5. module SomeModule =
  6.     let ParseMember filePath =
  7.         printf "This is never executed"
  8.  
  9.     let FunctionNeverCalled:int =
  10.         printf "Function called: %s\n" "FunctionNeverCalled"
  11.         0
  12.  
  13.     let InputFile =
  14.         match ConfigurationManager.AppSettings.Get "MemberListFile" with
  15.         | ""  -> failwithf "Invalid MemberListFile in configuration"
  16.         | file ->
  17.             if (File.Exists file ) then file
  18.             else failwithf "Invalid MemberListFile in configuration"
  19.  
  20.     let FunctionCalled =
  21.         let mylist = [(1,2);(2,3);(3,4);(1,2)]
  22.         mylist |> Seq.distinctBy (fun (x,y) -> (x,y)) |> printf "This function is called and the output is: %A\n"
  23.  
  24.  
  25.     [<EntryPoint>]
  26.     let main argv =
  27.         FunctionCalled
  28.         let someValue = System.Console.Read()
  29.         0 // return an integer exit code
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement