Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (24 sloc) 1.1 KB

This is a beginner's Haskell-based contribution to the 101companies Project.

If you have ghci installed, then you can easily test the code as follows:

 $ pwd
 $ ghci Main.hs 
 GHCi, version 7.4.2:  :? for help
 Loading package ghc-prim ... linking ... done.
 Loading package integer-gmp ... linking ... done.
 Loading package base ... linking ... done.
 [1 of 1] Compiling Main             ( Main.hs, interpreted )
 Ok, modules loaded: Main.
 *Main> main
 Leaving GHCi.

The main function (see the code) totals the salaries of all employees in a sample company (also to be found in the file), computes the median of all salaries, and it cuts all salaries in half to show again the total after the cut.

One can run "make" to check the main's function output against a baseline:

 $ make

Please find additional information here: