Category Archives: F#
A Monadic Pratt Parser
Introduction I recently read Beautiful Code which contains articles from several well known programmers about the code they consider beautiful. In Top Down Operator Precedence, Douglas Crockford discusses the Pratt Parser (named after Vaughan Pratt who wrote the paper on … Continue reading
Functional stateful programming in F#
F# is a multi-paradigm language which lets you program in both a functional pure manner and a imperative mutational way. With F#’s growing popularity many .NET programmers are trying out the language and are able to get started quickly because … Continue reading
FastSharp 2.0
I just released a new version of my FastSharp program. Download it or View the source code This release contains some notable enhancements: Support for multiple languages C# Visual Basic F# Pers… Continue reading →
Regex based Lexer with F#
This lexer allows you to define your regular expression based rules in a very declarative way using F# computation expressions. open Lexer
let definitions =
lexerDefinitions {
do! addNextlineDefinition “NEWLINE” @”(\n\r)|\n|\r”
do!…
A functional take on console program loop in F#
Often when learning a new technology I start with a simple console application in which the program is run in a loop it continues to prompt you for more input until you give some command like quit or exit or whatever you choose: Enter input: someInput…

