Recent snippets

Popular snippets

  • Command pattern for Redo-Undo II

    This command redo-undo implement group the command under Do/Undo category.

    70 people like this

    Posted: 14 years ago by Tao Liu

  • Chain of responsibility

    The following sample wants to make sure the person’s age is between 18 and 65, weight is no more than 200 and tall enough (>120).

    83 people like this

    Posted: 14 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

Snippets by tags

list (56) f# (43) fold (22) json (16) learning f# (16) sequence (32) dsl (23) html (16) wpf (20) algorithms (26) seq (54) sequences (48) collections (16) tutorial (17) web (29) monad (24) quotations (21) design patterns (18) string (29) recursion (33)

View all...

Database contains 3206 snippets out of which 1719 is public.