Recent snippets

Popular snippets

  • 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: 15 years ago by Dmitri Pavlenkov

  • Factory Pattern

    Factory pattern in F#

    82 people like this

    Posted: 14 years ago by Tao Liu

  • Split a list

    Three ways to split a list in half (but not necessarily in the middle). A forth version added that's very short and should be fast, as we only use List.fold. New champ found.

    84 people like this

    Posted: 15 years ago by Dmitri Pavlenkov

Snippets by tags

fold (22) learning f# (16) agent (20) regex (17) reflection (19) monad (24) tutorial (17) collections (16) tryfsharp (48) design patterns (18) f# (43) parsing (28) dsl (23) computation builder (17) computation expression (15) async (98) kata (17) game (32) http (18) staging (18)

View all...

Database contains 3208 snippets out of which 1719 is public.