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.

    73 people like this

    Posted: 14 years ago by Tomas Petricek

  • Composing a list of functions

    Composition of functions in F# is easily achieved by using the >> operator. You can also chain an arbitary amount of functions (represented as a list or sequence) together by folding the list/seq with >>. [More formally: the set of endomorphisms 'a -> 'a forms a monoid with the binary, associative operator ">>" (or "<<") and the neutral element "id".]

    87 people like this

    Posted: 14 years ago by Novox

  • Association list lookup

    While prototyping programs I find myself using association lists. This little snippet defines a lookup functions for association lists defined as lists of tuples.

    68 people like this

    Posted: 14 years ago by Alex Muscar

Snippets by tags

http (18) f# (43) array (22) staging (18) learning f# (16) tutorial (17) string (29) fold (22) tryfsharp (48) wpf (20) seq (54) algorithms (26) web (29) lists (15) html (16) monad (24) sequence (32) computation expression (15) silverlight (22) lazy (20)

View all...

Database contains 3206 snippets out of which 1719 is public.