Recent snippets

  • 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: 11 hours ago by Rick Minerich

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

    3 people like this

    Posted: 11 days ago by Vandroiy

  • F# Class Ctors

    F# Class constructors with wierd behaviour if more then two are present.

    3 people like this

    Posted: 12 days ago by ChrSt

Popular snippets

  • Asynchronous sequences

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

    107 people like this

    Posted: 7 years ago by Tomas Petricek

  • Break sequence into n-element subsequences

    I'm working on parallel computations and I thought it would be useful to break work into chunks, especially when processing each element asynchronously is too expensive. The neat thing is that this function is general even though motivation for it is specific. Another neat thing is that this is true lazy sequence unlike what you'd get if you used Seq.groupBy. There are three versions for your enjoyment.

    70 people like this

    Posted: 7 years ago by Dmitri Pavlenkov

  • 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

sequence (29) computation builder (14) sequences (47) lists (13) lazy (18) f# (42) html (14) agent (20) parsing (22) recursion (27) tutorial (17) xml (12) kata (17) game (30) design patterns (18) fparsec (14) array (18) reflection (18) silverlight (21) tryfsharp (48)

View all...

Database contains 2193 snippets out of which 1504 is public.