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.

    0 people like this

    Posted: 27 days ago by Cody

  • String.Join with pipe

    Just use the concat

    0 people like this

    Posted: 2 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.

    3 people like this

    Posted: 4 months ago by Tomas Petricek

Popular snippets

  • Strategy pattern

    Strategy pattern in F#

    83 people like this

    Posted: 13 years ago by Tao Liu

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

    73 people like this

    Posted: 14 years ago by Dmitri Pavlenkov

  • Units of Measure

    Show's how to define units of measure to add stronger typing to your numerical functions.

    75 people like this

    Posted: 14 years ago by Robert Pickering

Snippets by tags

parsing (28) algorithms (26) math (35) lists (15) generic programming (17) agent (20) sequence (32) tutorial (17) recursion (33) game (32) array (22) string (29) learning f# (16) reflection (19) tryfsharp (48) regex (17) wpf (20) seq (54) dsl (23) computation expression (15)

View all...

Database contains 3198 snippets out of which 1713 is public.