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

  • 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

  • Units of Measure

    Show's how to define units of measure to add stronger typing to your numerical functions.

    75 people like this

    Posted: 15 years ago by Robert Pickering

Snippets by tags

monad (24) string (29) learning f# (16) array (22) parsing (28) agent (20) web (29) quotations (21) tryfsharp (48) html (16) dsl (23) lists (15) mailboxprocessor (27) silverlight (22) sequences (48) async (98) tutorial (17) kata (17) math (35) collections (16)

View all...

Database contains 3212 snippets out of which 1719 is public.