F# Snippets

Recently added snippets

Popular snippets

  • Load XAML

    This example shows how to load a Xaml file allowing to use WPF from F#. It also shows how to access WPF objects and register event handlers.

    94 people like this
    Posted: 4 years ago by Antonio Cisternino

  • WPF / SilverLight Converter II

    version 1 is http://fssnip.net/62. This new version support convert from any existing function to a converter function by using composition and pipeline. The convert function is to make the function signature agree to the IValueConverter interface. You can add new functions in the FunctionLibrary module and reuse the class definition to reduce the coding effort. The first sample is to show how to make the converter pipeline work, the second one is a debugger converter used to debug the data binding problem.

    83 people like this
    Posted: 3 years ago by Tao Liu

  • Implementing active objects with a MailboxProcessor

    Mailbox processors can easily be used to implement active objects. This example shows how to do that with a reusable wrapper type and minimal boilerplate code in the actual class definitions. Supports both asynchronous calls and synchronous calls. For the latter case, exceptions are automatically propagated back to the caller.

    81 people like this
    Posted: 3 years ago by Wolfgang Meyer

  • Haskell function : iterate

    Implements iterate function from Haskell's Prelude. The function generates an infinite sequence by applying a function to the initial value (first) and then to the result of previous application.

    182 people like this
    Posted: 4 years ago by Nick Palladinos

  • Continuation-Passing Mnemonics

    Continuations provide a means whereby heap space can be traded for stack depth (heap space being generally more plentiful than stack depth). They are especially useful where tail recursion is not possible. Here are a couple of simple continuation examples that can be extended to cover more complex scenarios.

    81 people like this
    Posted: 4 years ago by Neil Carrier

  • Minimal XML DSL

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

    336 people like this
    Posted: 4 years ago by Blake Coverett

Snippets by tags

DSL (21) parsing (21) f# (33) string (15) SilverLight (21) sequences (43) MailboxProcessor (22) Kata (16) recursion (24) Design Patterns (18) Learning F# (15) Collections (15) tutorial (15) fold (15) Sequence (28) math (29) WPF (15) computation builder (13) list (42) tryfsharp (44) reflection (18) Seq (44) async (77) agent (19) game (22) web (15) monad (18) Lists (13) lazy (17) Algorithms (23)
View all..

Snippets by authors

View all..

Database contains 1578 snippets out of which 1169 are public.