Recent snippets

Popular snippets

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

    63 people like this

    Posted: 8 years ago by Tomas Petricek

  • WPF / SilverLight Converter II

    version 1 is This new version support convert from any existing function to a converter function by using composition and pipeline. The convert function is to make the function signature agree to the IValueConverter interface. You can add new functions in the FunctionLibrary module and reuse the class definition to reduce the coding effort. The first sample is to show how to make the converter pipeline work, the second one is a debugger converter used to debug the data binding problem.

    83 people like this

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

    71 people like this

    Posted: 8 years ago by Dmitri Pavlenkov

Snippets by tags

json (14) collections (16) silverlight (22) fold (19) kata (17) mailboxprocessor (27) design patterns (18) tryfsharp (48) generic programming (15) pattern matching (13) html (15) web (24) quotations (18) monad (22) computation builder (14) reflection (18) dsl (22) learning f# (16) math (32) list (51)

View all...

Database contains 2345 snippets out of which 1593 is public.