Recent snippets

Popular snippets

  • 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: 15 years ago by Novox

  • Creating objects with events

    This snippet shows how to create objects with events in F#. It shows both simple event (to be used from F#) and a .NET compatible event with specific delegate type.

    84 people like this

    Posted: 15 years ago by Tomas Petricek

  • Read only ref

    F# implementation of RO_ref from the "Effective ML" talk.

    92 people like this

    Posted: 14 years ago by fholm

Snippets by tags

f# (43) agent (20) wpf (20) math (35) string (29) dsl (23) recursion (33) http (18) lazy (20) monad (24) regex (17) html (16) algorithms (26) staging (18) lists (15) game (32) collections (16) seq (54) quotations (21) computation expression (15)

View all...

Database contains 3208 snippets out of which 1719 is public.