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

  • Asynchronous sequences

    An asynchronous sequence is similar to the seq type, but the elements of the sequence are generated asynchronously without blocking the caller as in Async. This snippet declares asynchronous sequence and uses it to compare two files in 1k blocks.

    109 people like this

    Posted: 14 years ago by Tomas Petricek

  • The Haskell const function

    The const function is simple, but you can use it to make your code more legible. In this example we convert a unary function to a function of arity 2 (that ignores the second argument). Also by using the flip function from Haskell (which is equally easy to define) you can ignore the first argument.

    119 people like this

    Posted: 14 years ago by Alex Muscar

Snippets by tags

mailboxprocessor (27) tryfsharp (48) monad (24) dsl (23) parsing (28) game (32) staging (18) seq (54) list (56) learning f# (16) algorithms (26) fold (22) computation expression (15) tutorial (17) lists (15) f# (43) wpf (20) web (29) pattern matching (15) kata (17)

View all...

Database contains 3206 snippets out of which 1719 is public.