Functional Programming

Customizing document styles with FSharp.Markdown.Pdf

Following on from my last post on formatting a Markdown document into PDF using FSharp.Markdown.Pdf, if you don’t like the default styling (which I tried to mimic style Github formats Markdown documents with) you can set your own styling for the different types of Markdown elements by going down a level of abstraction. The FSharp.Markdown.Pdf.MarkdownStyleNames …

Customizing document styles with FSharp.Markdown.Pdf Read More »

F# – PDF fun with Markdown and FSharp.Formatting

I spent the last couple of nights putting together a simple Markdown to PDF formatter using Tomas Petricek’s FSharp.Formatting project and the PdfSharp-MigraDoc library. To use this library, you can either grab the source from the GitHub repository or get it from Nuget using the following command: F# Usage To use the library from F#, …

F# – PDF fun with Markdown and FSharp.Formatting Read More »

F# – merge sort on array

Here’s a simple F# implementation of the merge sort algorithm (using mutable arrays) outlined in the Algorithms : Design and Analysis Part 1 course on Coursera. So refreshing to be writing simple sorting algorithms years after university, still fun!

F# – helper functions to convert between Async<unit> and Task

With the official release of .Net 4.5 and Visual Studio 2012, I suspect many .Net developers will be rushing to rewrite their data access or network layers (amongst many many other things!) to take advantage of the new async-await (see the excellent 101 examples here) language feature in C#, which means you’ll likely be working …

F# – helper functions to convert between Async<unit> and Task Read More »

F# – Starting an Agent with supervision

In Erlang, we have the Supervisor behaviour which makes it very easy to provide the means to monitor and restart a whole network of workers and other supervisors based on some configured strategy. The MailboxProcessor (aka agents) in F# doesn’t come with the same higher-level abstractions (such as Erlang’s gen_server, gen_fsm behaviours) by default, but …

F# – Starting an Agent with supervision Read More »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close