F# Snippets

Recently added snippets

Popular snippets

  • Minimal XML DSL

    This snippet provides a very small internal DSL for creating and querying XML using the underlying XLinq classes.

    326 people like this
    Posted: 3 years ago by Blake Coverett

  • The Haskell const function

    The const function is simple, but you can use it to make your code more legible. In this example we convert a unary function to a function of arity 2 (that ignores the second argument). Also by using the flip function from Haskell (which is equally easy to define) you can ignore the first argument.

    99 people like this
    Posted: 3 years ago by Alex Muscar

  • A beautiful fixed-point finding function

    We start with an initial value and then applying f repeatedly, until the value does not change anymore.

    249 people like this
    Posted: 3 years ago by Nick Palladinos

  • Hello world (F#)

    Classical "Hello world" example that prints a message to the console output. This version uses F# printfn function to do the printing.

    161 people like this
    Posted: 3 years ago by Tomas Petricek

  • Read only ref

    F# implementation of RO_ref from the "Effective ML" talk.

    79 people like this
    Posted: 3 years ago by fholm

  • Monadic Memoization

    Modular memoization within a pure functional setting that is implemented as a convenient computation builder.

    75 people like this
    Posted: 3 years ago by Nick Palladinos

Snippets by tags

web (15) WPF (15) computation builder (13) Design Patterns (18) agent (16) DSL (21) list (39) tryfsharp (40) string (14) Learning F# (15) lazy (17) reflection (18) Algorithms (21) F# (33) Sequence (28) sequences (43) Collections (12) Kata (16) parsing (20) Async (66) lists (12) MailboxProcessor (20) math (28) recursion (23) Seq (42) SilverLight (21) fold (13) monad (18) tutorial (15) game (22)
View all..

Snippets by authors

View all..

Database contains 1443 snippets out of which 1090 are public.