F# Snippets

Recently added snippets

  • Simple example of cross platform Eto forms library

    Simple example of Eto library usage for drawing

    Posted: 4 days ago by Antonio Cisternino

  • Reversing RELEASE_NOTES.md

    Reversing RELEASE_NOTES.md Very ugly version hacked together in a minute

    Posted: 12 days ago by Gustavo Guerra

  • Event stream projection with actors

    An example of using an actor (MailboxProcessor) to coordinate the projection of events from an event stream into a persisted projection. This example covers handling simple concurrency conflicts via also persisting and checking the latest event ID with with projection. The update command will take the current projection and apply all new events before persisting it back. The rebuild command will ignore an existing projection and replay all events in the stream.

    Posted: 14 days ago by Daniel Bradley

Popular snippets

  • Asynchronous sequences

    An asynchronous sequence is similar to the seq<T> type, but the elements of the sequence are generated asynchronously without blocking the caller as in Async<T>. This snippet declares asynchronous sequence and uses it to compare two files in 1k blocks.

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

  • 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: 3 years ago by Antonio Cisternino

  • Get Stock Quote Data and Historical Stock Prices from Yahoo Finance

    Get Stock Quote Data and Historical Stock Prices from Yahoo Finance.

    212 people like this
    Posted: 3 years ago by Tuomas Hietanen

  • Chain of responsibility II

    Unlike the previous chain of responsibility, this version use the pipeline to chain responsibilities.

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

  • 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

  • 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: 3 years ago by Neil Carrier

Snippets by tags

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

Snippets by authors

View all..

Database contains 1467 snippets out of which 1102 are public.