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

  • Read only ref

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

    92 people like this

    Posted: 14 years ago by fholm

  • Split a list

    Three ways to split a list in half (but not necessarily in the middle). A forth version added that's very short and should be fast, as we only use List.fold. New champ found.

    83 people like this

    Posted: 14 years ago by Dmitri Pavlenkov

Snippets by tags

tryfsharp (48) silverlight (22) lazy (20) lists (15) sequence (32) web (29) regex (17) computation builder (17) reflection (19) fold (22) game (32) tutorial (17) json (16) algorithms (26) html (16) kata (17) string (29) http (18) seq (54) design patterns (18)

View all...

Database contains 3207 snippets out of which 1719 is public.