Recent snippets

Popular snippets

  • Minimal XML DSL

    This snippet provides a very small internal DSL for creating and querying XML using the underlying XLinq classes.

    374 people like this

    Posted: 15 years ago by Blake Coverett

  • 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

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

    74 people like this

    Posted: 15 years ago by Tomas Petricek

Snippets by tags

string (29) lists (15) sequences (48) recursion (33) http (18) reflection (19) algorithms (26) math (35) pattern matching (15) seq (54) list (56) computation builder (17) sequence (32) regex (17) json (16) wpf (20) collections (16) tryfsharp (48) f# (43) design patterns (18)

View all...

Database contains 3207 snippets out of which 1719 is public.