Recent snippets

  • Similar string Markov chain

    Generates strings that are similar to the input, as measured by the probability of a symbol depending on preceding symbols. (Markov chain) The order, which defines how many preceding symbols to look at before placing another, is variable.

    0 people like this

    Posted: 4 hours ago by Vandroiy

  • Generate a repeating infinite sequence

    A little function which generates an infinite sequence consisting of repeats of items from some shorter sequence.

    0 people like this

    Posted: 12 hours ago by Sehnsucht

  • Decode Base36 in F#

    I couldn't fine a reasonably fast or good (yuck floats) implementation anywhere so I wrote one. All of the error checking does slow it down and should be ideally done up front.

    0 people like this

    Posted: yesterday by Rick Minerich

Popular snippets

  • Pipeline list processing

    An example showing how to process list in a pipeline. We first use List.filter to return only even numbers and then use to format them as strings.

    87 people like this

    Posted: 7 years ago by Tomas Petricek

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

    88 people like this

    Posted: 7 years ago by Neil Carrier

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

    203 people like this

    Posted: 7 years ago by Nick Palladinos

Snippets by tags

monad (20) parsing (22) sequences (47) staging (18) learning f# (16) fparsec (14) pattern matching (12) wpf (18) computation builder (14) list (49) mailboxprocessor (26) html (14) string (18) algorithms (25) agent (20) web (24) tutorial (17) array (18) tryfsharp (48) game (30)

View all...

Database contains 2193 snippets out of which 1504 is public.