Recent snippets

Popular snippets

  • Break sequence into n-element subsequences

    I'm working on parallel computations and I thought it would be useful to break work into chunks, especially when processing each element asynchronously is too expensive. The neat thing is that this function is general even though motivation for it is specific. Another neat thing is that this is true lazy sequence unlike what you'd get if you used Seq.groupBy. There are three versions for your enjoyment.

    73 people like this

    Posted: 15 years ago by Dmitri Pavlenkov

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

    85 people like this

    Posted: 14 years ago by Tao Liu

  • Hello world (F#)

    Classical "Hello world" example that prints a message to the console output. This version uses F# printfn function to do the printing.

    186 people like this

    Posted: 15 years ago by Tomas Petricek

Snippets by tags

html (16) async (98) tutorial (17) lists (15) list (56) monad (24) silverlight (22) sequences (48) staging (18) lazy (20) learning f# (16) sequence (32) fold (22) string (29) pattern matching (15) computation builder (17) web (29) dsl (23) regex (17) tryfsharp (48)

View all...

Database contains 3208 snippets out of which 1719 is public.