Recent snippets

  • Functional wrappers for TryParse APIs

    Exemplary convenience wrappers for some of the System..TryParse APIs, using the combined power of F#' return value deconstruction mechanism via pattern matching, active patterns and option types instead of "out/ref" parameters. Added support for newest versions of F# to determine which overload of TryParse should be used.

    1 people like this

    Posted: 3 months ago by Cody

  • String.Join with pipe

    Just use the concat

    0 people like this

    Posted: 5 months ago by Tuomas Hietanen

  • Nested list functions

    Higher-order functions for working with nested lists that reimplement various useful List module functions, but work on nested lists, preserving the original nesting strucutre when possible.

    4 people like this

    Posted: 6 months ago by Tomas Petricek

Popular snippets

  • Read only ref

    F# implementation of RO_ref from the "Effective ML" talk.

    90 people like this

    Posted: 14 years ago by fholm

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

    109 people like this

    Posted: 14 years ago by Tomas Petricek

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

    73 people like this

    Posted: 14 years ago by Tomas Petricek

Snippets by tags

wpf (20) parsing (28) tryfsharp (48) design patterns (18) staging (18) learning f# (16) reflection (19) recursion (33) array (22) async (98) json (15) pattern matching (15) dsl (23) generic programming (17) monad (24) list (56) fold (22) web (29) regex (17) sequence (32)

View all...

Database contains 3200 snippets out of which 1714 is public.