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.

    71 people like this

    Posted: 12 years ago by Dmitri Pavlenkov

  • Chain of responsibility II

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

    101 people like this

    Posted: 11 years ago by Tao Liu

  • Adapter pattern

    Invoke the methods from incompatible types

    109 people like this

    Posted: 11 years ago by Tao Liu

  • Dynamic operator using Reflection

    Demonstrates how to implement the dynamic operator (?) using .NET Reflection. The implementation supports calling constructors, propreties and methods using simple overload resolution (based on parameter count). It handles instance as well as static members.

    71 people like this

    Posted: 11 years ago by Tomas Petricek

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

    71 people like this

    Posted: 12 years ago by Dmitri Pavlenkov

  • Top-Down-Operator-Precedence Parser

    F# implementation of a generic Top-Down-Operator-Precedence Parser as described in this paper http://portal.acm.org/citation.cfm?id=512931 Example starts at line ~300

    87 people like this

    Posted: 11 years ago by fholm

Snippets by tags

staging (18) array (22) monad (23) mailboxprocessor (27) seq (54) recursion (33) sequences (48) collections (16) lists (14) design patterns (18) http (18) agent (20) async (98) string (27) game (32) reflection (19) json (14) tutorial (17) web (29) silverlight (22)

View all...

Database contains 3104 snippets out of which 1703 is public.