F# Snippets

Recently added snippets

  • Fourth order Runge-Kutta ODE solver

    This is a simple and direct implementation of fourth order runge-kutta ordinary differential equation solver algorithm. In the main function three use cases are shown.

    Posted: 5 days ago by Antonio Prestes García

  • Musical Note Frequencies

    With the usual Western music it is common to use the Equal temperament: http://en.wikipedia.org/wiki/Equal_temperament http://hyperphysics.phy-astr.gsu.edu/hbase/music/et.html Then the note frequencies are calculated by this formula. For more information: http://en.wikipedia.org/wiki/Pitch_(music) http://en.wikipedia.org/wiki/Musical_tuning#Tuning_systems

    Posted: 6 days ago by Tuomas Hietanen

  • Generate a date range sequence (alternative)

    Generates a sequence of dates (ascending or descending), incrementing (or decrementing) by one day at a time, inclusive of the start and end dates. This is just simpler alternative version of: http://www.fssnip.net/oS (which was password-protected)

    Posted: 6 days ago by Tuomas Hietanen

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.

    84 people like this
    Posted: 4 years ago by Tomas Petricek

  • get the list of LAN Sql servers

    get the list of ethernet sql servers

    78 people like this
    Posted: 3 years ago by nCdy

  • 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

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

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

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

  • 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.

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

  • 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: 4 years ago by Alex Muscar

Snippets by tags

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

Snippets by authors

View all..

Database contains 1511 snippets out of which 1130 are public.