Headline

A non-monadic implementation of the Logging feature in F# for the Technology:.NET Framework

Characteristics

This first step in logging salary changes is implemented through a straightforward family of functions in a way that salary changes are passed into and out of functions through tuples. This code is quite voluminous and can be improved and shortened by using monads.

Illustration

Salary changes are kept through the following log data:

Invalid Language supplied
A log resulting of a salary cut from the sample company:
Invalid Language supplied
The median can be computed for a given log as follows:
Invalid Language supplied
The sample log resolves to the following median:
Invalid Language supplied

Feature:Cut is implemented in a logging-enabling way as follows:

Invalid Language supplied

Relationships

See Contribution:fsharpRecords for a implementation of Feature:Cut without logging.

Architecture

The contribution consists of five modules: "Data.fs" which contains the definition of the used classes; "Sample.fs" which creates a sample instance of a company; "Log.fs" which contains the log datastructure as well as the functions log2deltas, log2mean and log2median. "Cut.fs" which contains the cut functions (with logs) for employees, departments and a company. "Main.fs" which basically creates a sample company through "buildCompany" of "Sample.fs" and executes cut printing the results as well as the log;


There are no revisions for this page.

User contributions

    This user never has never made submissions.

    User edits

    Syntax for editing wiki

    For you are available next options:

    will make text bold.

    will make text italic.

    will make text underlined.

    will make text striked.

    will allow you to paste code headline into the page.

    will allow you to link into the page.

    will allow you to paste code with syntax highlight into the page. You will need to define used programming language.

    will allow you to paste image into the page.

    is list with bullets.

    is list with numbers.

    will allow your to insert slideshare presentation into the page. You need to copy link to presentation and insert it as parameter in this tag.

    will allow your to insert youtube video into the page. You need to copy link to youtube page with video and insert it as parameter in this tag.

    will allow your to insert code snippets from @worker.

    Syntax for editing wiki

    For you are available next options:

    will make text bold.

    will make text italic.

    will make text underlined.

    will make text striked.

    will allow you to paste code headline into the page.

    will allow you to link into the page.

    will allow you to paste code with syntax highlight into the page. You will need to define used programming language.

    will allow you to paste image into the page.

    is list with bullets.

    is list with numbers.

    will allow your to insert slideshare presentation into the page. You need to copy link to presentation and insert it as parameter in this tag.

    will allow your to insert youtube video into the page. You need to copy link to youtube page with video and insert it as parameter in this tag.

    will allow your to insert code snippets from @worker.