Recent snippets

Popular snippets

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

    84 people like this

    Posted: 15 years ago by Dmitri Pavlenkov

  • 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

  • Command pattern for Redo-Undo II

    This command redo-undo implement group the command under Do/Undo category.

    71 people like this

    Posted: 14 years ago by Tao Liu

Snippets by tags

async (98) generic programming (17) dsl (23) learning f# (16) pattern matching (15) tryfsharp (48) kata (17) string (29) html (16) tutorial (17) computation builder (17) game (32) fold (22) http (18) computation expression (15) sequence (32) reflection (19) f# (43) web (29) wpf (20)

View all...

Database contains 3208 snippets out of which 1719 is public.