Recent snippets

Popular snippets

  • Projecting lists

    Three functions showing how to implement projection for functional lists. First version uses naive recursion and the second one is tail-recursive using the accumulator parameter. The third version extends this with continuation passing.

    75 people like this

    Posted: 15 years ago by Tomas Petricek

  • Struct Tuple

    Two/Three/Four-element generic tuples implemented as a value types for writing more efficient F# code.

    77 people like this

    Posted: 15 years ago by fholm

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

    100 people like this

    Posted: 15 years ago by Neil Carrier

Snippets by tags

lists (15) string (29) json (16) regex (17) game (32) computation builder (17) sequence (32) generic programming (17) lazy (20) quotations (21) recursion (33) reflection (19) http (18) monad (24) web (29) dsl (23) algorithms (25) seq (54) mailboxprocessor (27) tryfsharp (48)

View all...

Database contains 3208 snippets out of which 1719 is public.