Recent snippets

Popular snippets

  • Continuation-Passing Mnemonics

    Continuations provide a means whereby heap space can be traded for stack depth (heap space being generally more plentiful than stack depth). They are especially useful where tail recursion is not possible. Here are a couple of simple continuation examples that can be extended to cover more complex scenarios.

    100 people like this

    Posted: 14 years ago by Neil Carrier

  • Chain of responsibility

    The following sample wants to make sure the person’s age is between 18 and 65, weight is no more than 200 and tall enough (>120).

    83 people like this

    Posted: 14 years ago by Tao Liu

  • 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

pattern matching (15) lazy (20) http (18) computation builder (17) monad (24) tutorial (17) string (29) silverlight (22) wpf (20) reflection (19) f# (43) list (56) generic programming (17) quotations (21) recursion (33) regex (17) sequence (32) staging (18) mailboxprocessor (27) computation expression (15)

View all...

Database contains 3206 snippets out of which 1719 is public.