Recent snippets

Popular snippets

  • Chain of responsibility II

    Unlike the previous chain of responsibility, this version use the pipeline to chain responsibilities.

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

    83 people like this

    Posted: 14 years ago by Dmitri Pavlenkov

  • 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

Snippets by tags

array (22) staging (18) parsing (28) http (18) silverlight (22) string (29) lists (15) wpf (20) mailboxprocessor (27) monad (24) generic programming (17) regex (17) recursion (33) html (16) algorithms (26) async (98) tutorial (17) json (16) math (35) sequence (32)

View all...

Database contains 3205 snippets out of which 1719 is public.